Merge branch 'release/1.4.0' into develop
[oweals/peertube.git] / server / initializers / migrations / 0195-support.ts
1 import * as Sequelize from 'sequelize'
2
3 async function up (utils: {
4   transaction: Sequelize.Transaction,
5   queryInterface: Sequelize.QueryInterface,
6   sequelize: Sequelize.Sequelize
7 }): Promise<void> {
8   {
9     const data = {
10       type: Sequelize.STRING(500),
11       allowNull: true,
12       defaultValue: null
13     }
14     await utils.queryInterface.addColumn('video', 'support', data)
15   }
16
17   {
18     const data = {
19       type: Sequelize.STRING(500),
20       allowNull: true,
21       defaultValue: null
22     }
23     await utils.queryInterface.addColumn('videoChannel', 'support', data)
24   }
25
26   {
27     const data = {
28       type: Sequelize.STRING(250),
29       allowNull: true,
30       defaultValue: null
31     }
32     await utils.queryInterface.addColumn('account', 'description', data)
33   }
34
35   {
36     const data = {
37       type: Sequelize.STRING(10000),
38       allowNull: true,
39       defaultValue: null
40     }
41     await utils.queryInterface.changeColumn('video', 'description', data)
42   }
43 }
44
45 function down (options) {
46   throw new Error('Not implemented.')
47 }
48
49 export {
50   up,
51   down
52 }