aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations/0120-video-null.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/migrations/0120-video-null.ts')
-rw-r--r--server/initializers/migrations/0120-video-null.ts46
1 files changed, 46 insertions, 0 deletions
diff --git a/server/initializers/migrations/0120-video-null.ts b/server/initializers/migrations/0120-video-null.ts
new file mode 100644
index 000000000..3506a5046
--- /dev/null
+++ b/server/initializers/migrations/0120-video-null.ts
@@ -0,0 +1,46 @@
1import * as Sequelize from 'sequelize'
2import { PeerTubeDatabase } from '../database'
3
4async function up (utils: {
5 transaction: Sequelize.Transaction,
6 queryInterface: Sequelize.QueryInterface,
7 sequelize: Sequelize.Sequelize,
8 db: PeerTubeDatabase
9}): Promise<void> {
10
11 {
12 const data = {
13 type: Sequelize.INTEGER,
14 allowNull: true,
15 defaultValue: null
16 }
17 await utils.queryInterface.changeColumn('Videos', 'licence', data)
18 }
19
20 {
21 const data = {
22 type: Sequelize.INTEGER,
23 allowNull: true,
24 defaultValue: null
25 }
26 await utils.queryInterface.changeColumn('Videos', 'category', data)
27 }
28
29 {
30 const data = {
31 type: Sequelize.INTEGER,
32 allowNull: true,
33 defaultValue: null
34 }
35 await utils.queryInterface.changeColumn('Videos', 'description', data)
36 }
37}
38
39function down (options) {
40 throw new Error('Not implemented.')
41}
42
43export {
44 up,
45 down
46}