From 85c1df6ae899be2b1bdd9691b38a2a2b94bffdcf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Sep 2019 10:35:36 +0200 Subject: Add auto play next video migration --- .../migrations/0440-user-auto-play-next-video.ts | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 server/initializers/migrations/0440-user-auto-play-next-video.ts (limited to 'server/initializers/migrations') diff --git a/server/initializers/migrations/0440-user-auto-play-next-video.ts b/server/initializers/migrations/0440-user-auto-play-next-video.ts new file mode 100644 index 000000000..f0baafe7b --- /dev/null +++ b/server/initializers/migrations/0440-user-auto-play-next-video.ts @@ -0,0 +1,27 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction, + queryInterface: Sequelize.QueryInterface, + sequelize: Sequelize.Sequelize, + db: any +}): Promise { + { + const data = { + type: Sequelize.BOOLEAN, + allowNull: false, + defaultValue: false + } + + await utils.queryInterface.addColumn('user', 'autoPlayNextVideo', data) + } +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- cgit v1.2.3