diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-26 10:45:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-26 11:02:04 +0200 |
commit | 2cebd797014561ebc0bfee07ee8b5d83820adb66 (patch) | |
tree | fe912e29c7321c3c29e94691520615a741899e71 /server/initializers/migrations/0055-video-uuid.ts | |
parent | c1e791bad0b079af67398f6407221e6dcbb573dd (diff) | |
download | PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.tar.gz PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.tar.zst PeerTube-2cebd797014561ebc0bfee07ee8b5d83820adb66.zip |
Fix last commit
Diffstat (limited to 'server/initializers/migrations/0055-video-uuid.ts')
-rw-r--r-- | server/initializers/migrations/0055-video-uuid.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/initializers/migrations/0055-video-uuid.ts b/server/initializers/migrations/0055-video-uuid.ts index 6db25f193..e0f904080 100644 --- a/server/initializers/migrations/0055-video-uuid.ts +++ b/server/initializers/migrations/0055-video-uuid.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | 2 | import * as Promise from 'bluebird' |
3 | import { Migration } from '../../models/migrations' | ||
3 | 4 | ||
4 | function up (utils: { | 5 | function up (utils: { |
5 | transaction: Sequelize.Transaction, | 6 | transaction: Sequelize.Transaction, |
@@ -12,7 +13,7 @@ function up (utils: { | |||
12 | type: Sequelize.UUID, | 13 | type: Sequelize.UUID, |
13 | defaultValue: Sequelize.UUIDV4, | 14 | defaultValue: Sequelize.UUIDV4, |
14 | allowNull: true | 15 | allowNull: true |
15 | } | 16 | } as Migration.UUID |
16 | 17 | ||
17 | return q.addColumn('Videos', 'uuid', dataUUID) | 18 | return q.addColumn('Videos', 'uuid', dataUUID) |
18 | .then(() => { | 19 | .then(() => { |
@@ -24,7 +25,7 @@ function up (utils: { | |||
24 | return utils.sequelize.query(query) | 25 | return utils.sequelize.query(query) |
25 | }) | 26 | }) |
26 | .then(() => { | 27 | .then(() => { |
27 | dataUUID.defaultValue = null // FIXME:default value cannot be null if string | 28 | dataUUID.defaultValue = null |
28 | 29 | ||
29 | return q.changeColumn('Videos', 'uuid', dataUUID) | 30 | return q.changeColumn('Videos', 'uuid', dataUUID) |
30 | }) | 31 | }) |