diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-09 13:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-09 13:32:44 +0200 |
commit | a10fc78bb0e00e98c8f59edc16cd323b9c8b0615 (patch) | |
tree | 4988ea8836d47321061c7f8c8a78ebd2b4eb35ef /server/initializers/migrations | |
parent | 360329cc029c062bfb145c90f7bf1c007c39af81 (diff) | |
download | PeerTube-a10fc78bb0e00e98c8f59edc16cd323b9c8b0615.tar.gz PeerTube-a10fc78bb0e00e98c8f59edc16cd323b9c8b0615.tar.zst PeerTube-a10fc78bb0e00e98c8f59edc16cd323b9c8b0615.zip |
Fix video channel description/support max length
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r-- | server/initializers/migrations/0215-video-support-length.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/server/initializers/migrations/0215-video-support-length.ts b/server/initializers/migrations/0215-video-support-length.ts new file mode 100644 index 000000000..994eda60d --- /dev/null +++ b/server/initializers/migrations/0215-video-support-length.ts | |||
@@ -0,0 +1,44 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | import { CONSTRAINTS_FIELDS } from '../index' | ||
3 | |||
4 | async function up (utils: { | ||
5 | transaction: Sequelize.Transaction, | ||
6 | queryInterface: Sequelize.QueryInterface, | ||
7 | sequelize: Sequelize.Sequelize | ||
8 | }): Promise<void> { | ||
9 | { | ||
10 | const data = { | ||
11 | type: Sequelize.STRING(500), | ||
12 | allowNull: true, | ||
13 | defaultValue: null | ||
14 | } | ||
15 | await utils.queryInterface.changeColumn('video', 'support', data) | ||
16 | } | ||
17 | |||
18 | { | ||
19 | const data = { | ||
20 | type: Sequelize.STRING(500), | ||
21 | allowNull: true, | ||
22 | defaultValue: null | ||
23 | } | ||
24 | await utils.queryInterface.changeColumn('videoChannel', 'support', data) | ||
25 | } | ||
26 | |||
27 | { | ||
28 | const data = { | ||
29 | type: Sequelize.STRING(500), | ||
30 | allowNull: true, | ||
31 | defaultValue: null | ||
32 | } | ||
33 | await utils.queryInterface.changeColumn('videoChannel', 'description', data) | ||
34 | } | ||
35 | } | ||
36 | |||
37 | function down (options) { | ||
38 | throw new Error('Not implemented.') | ||
39 | } | ||
40 | |||
41 | export { | ||
42 | up, | ||
43 | down | ||
44 | } | ||