]>
Commit | Line | Data |
---|---|---|
8e7f08b5 | 1 | import * as Sequelize from 'sequelize' |
baeefe22 | 2 | import { CONSTRAINTS_FIELDS } from '../constants' |
8e7f08b5 C |
3 | |
4 | async function up (utils: { | |
5 | transaction: Sequelize.Transaction, | |
6 | queryInterface: Sequelize.QueryInterface, | |
7 | sequelize: Sequelize.Sequelize, | |
3fd3ab2d | 8 | db: any |
8e7f08b5 C |
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 = { | |
baeefe22 | 31 | type: Sequelize.STRING(CONSTRAINTS_FIELDS.VIDEOS.DESCRIPTION.max), |
8e7f08b5 C |
32 | allowNull: true, |
33 | defaultValue: null | |
34 | } | |
35 | await utils.queryInterface.changeColumn('Videos', 'description', data) | |
36 | } | |
37 | } | |
38 | ||
39 | function down (options) { | |
40 | throw new Error('Not implemented.') | |
41 | } | |
42 | ||
43 | export { | |
44 | up, | |
45 | down | |
46 | } |