]>
Commit | Line | Data |
---|---|---|
8e7f08b5 | 1 | import * as Sequelize from 'sequelize' |
baeefe22 | 2 | import { CONSTRAINTS_FIELDS } from '../constants' |
8e7f08b5 C |
3 | import { PeerTubeDatabase } from '../database' |
4 | ||
5 | async function up (utils: { | |
6 | transaction: Sequelize.Transaction, | |
7 | queryInterface: Sequelize.QueryInterface, | |
8 | sequelize: Sequelize.Sequelize, | |
9 | db: PeerTubeDatabase | |
10 | }): Promise<void> { | |
11 | ||
12 | { | |
13 | const data = { | |
14 | type: Sequelize.INTEGER, | |
15 | allowNull: true, | |
16 | defaultValue: null | |
17 | } | |
18 | await utils.queryInterface.changeColumn('Videos', 'licence', data) | |
19 | } | |
20 | ||
21 | { | |
22 | const data = { | |
23 | type: Sequelize.INTEGER, | |
24 | allowNull: true, | |
25 | defaultValue: null | |
26 | } | |
27 | await utils.queryInterface.changeColumn('Videos', 'category', data) | |
28 | } | |
29 | ||
30 | { | |
31 | const data = { | |
baeefe22 | 32 | type: Sequelize.STRING(CONSTRAINTS_FIELDS.VIDEOS.DESCRIPTION.max), |
8e7f08b5 C |
33 | allowNull: true, |
34 | defaultValue: null | |
35 | } | |
36 | await utils.queryInterface.changeColumn('Videos', 'description', data) | |
37 | } | |
38 | } | |
39 | ||
40 | function down (options) { | |
41 | throw new Error('Not implemented.') | |
42 | } | |
43 | ||
44 | export { | |
45 | up, | |
46 | down | |
47 | } |