From 1d49e1e27d63db1dfc9a7fd28c9902f488831a89 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 3 Apr 2017 21:24:36 +0200 Subject: Server: Add NSFW in user profile --- .../initializers/migrations/0045-user-display-nsfw.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 server/initializers/migrations/0045-user-display-nsfw.js (limited to 'server/initializers/migrations') 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 @@ +'use strict' + +// utils = { transaction, queryInterface, sequelize, Sequelize } +exports.up = function (utils, finalCallback) { + const q = utils.queryInterface + const Sequelize = utils.Sequelize + + const data = { + type: Sequelize.BOOLEAN, + allowNull: false, + defaultValue: false + } + + q.addColumn('Users', 'displayNSFW', data, { transaction: utils.transaction }).asCallback(finalCallback) +} + +exports.down = function (options, callback) { + throw new Error('Not implemented.') +} -- cgit v1.2.3