diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-15 22:22:03 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-20 09:57:40 +0200 |
commit | 65fcc3119c334b75dd13bcfdebf186afdc580a8f (patch) | |
tree | 4f2158c61a9b7c3f47cfa233d01413b946ee53c0 /server/initializers/migrations/0040-video-nsfw.js | |
parent | d5f345ed4cfac4e1fa84dcb4fce1cda4d32f9c73 (diff) | |
download | PeerTube-65fcc3119c334b75dd13bcfdebf186afdc580a8f.tar.gz PeerTube-65fcc3119c334b75dd13bcfdebf186afdc580a8f.tar.zst PeerTube-65fcc3119c334b75dd13bcfdebf186afdc580a8f.zip |
First typescript iteration
Diffstat (limited to 'server/initializers/migrations/0040-video-nsfw.js')
-rw-r--r-- | server/initializers/migrations/0040-video-nsfw.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/server/initializers/migrations/0040-video-nsfw.js b/server/initializers/migrations/0040-video-nsfw.js deleted file mode 100644 index 7f3692b28..000000000 --- a/server/initializers/migrations/0040-video-nsfw.js +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | const waterfall = require('async/waterfall') | ||
4 | |||
5 | // utils = { transaction, queryInterface, sequelize, Sequelize } | ||
6 | exports.up = function (utils, finalCallback) { | ||
7 | const q = utils.queryInterface | ||
8 | const Sequelize = utils.Sequelize | ||
9 | |||
10 | const data = { | ||
11 | type: Sequelize.BOOLEAN, | ||
12 | allowNull: false, | ||
13 | defaultValue: false | ||
14 | } | ||
15 | |||
16 | waterfall([ | ||
17 | |||
18 | function addNSFWColumn (callback) { | ||
19 | q.addColumn('Videos', 'nsfw', data, { transaction: utils.transaction }).asCallback(function (err) { | ||
20 | return callback(err) | ||
21 | }) | ||
22 | }, | ||
23 | |||
24 | function nullOnDefault (callback) { | ||
25 | data.defaultValue = null | ||
26 | |||
27 | q.changeColumn('Videos', 'nsfw', data, { transaction: utils.transaction }).asCallback(callback) | ||
28 | } | ||
29 | ], finalCallback) | ||
30 | } | ||
31 | |||
32 | exports.down = function (options, callback) { | ||
33 | throw new Error('Not implemented.') | ||
34 | } | ||