diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-03 21:24:36 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-03 21:24:36 +0200 |
commit | 1d49e1e27d63db1dfc9a7fd28c9902f488831a89 (patch) | |
tree | ce3353ad691876c55ce8fcfdd70bfa2b9112b39a /server/initializers/migrations/0045-user-display-nsfw.js | |
parent | 31b59b477459d4f26ed8ef089a0e5553fb6a332b (diff) | |
download | PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.gz PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.tar.zst PeerTube-1d49e1e27d63db1dfc9a7fd28c9902f488831a89.zip |
Server: Add NSFW in user profile
Diffstat (limited to 'server/initializers/migrations/0045-user-display-nsfw.js')
-rw-r--r-- | server/initializers/migrations/0045-user-display-nsfw.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/server/initializers/migrations/0045-user-display-nsfw.js b/server/initializers/migrations/0045-user-display-nsfw.js new file mode 100644 index 000000000..03624e593 --- /dev/null +++ b/server/initializers/migrations/0045-user-display-nsfw.js | |||
@@ -0,0 +1,19 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | // utils = { transaction, queryInterface, sequelize, Sequelize } | ||
4 | exports.up = function (utils, finalCallback) { | ||
5 | const q = utils.queryInterface | ||
6 | const Sequelize = utils.Sequelize | ||
7 | |||
8 | const data = { | ||
9 | type: Sequelize.BOOLEAN, | ||
10 | allowNull: false, | ||
11 | defaultValue: false | ||
12 | } | ||
13 | |||
14 | q.addColumn('Users', 'displayNSFW', data, { transaction: utils.transaction }).asCallback(finalCallback) | ||
15 | } | ||
16 | |||
17 | exports.down = function (options, callback) { | ||
18 | throw new Error('Not implemented.') | ||
19 | } | ||