From 9567011bf01f36c7f796ac1e0f1fb12c71635e53 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Oct 2017 10:16:27 +0100 Subject: Add lazy description on server --- .../migrations/0090-videos-description.ts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 server/initializers/migrations/0090-videos-description.ts (limited to 'server/initializers/migrations/0090-videos-description.ts') diff --git a/server/initializers/migrations/0090-videos-description.ts b/server/initializers/migrations/0090-videos-description.ts new file mode 100644 index 000000000..6f98dcade --- /dev/null +++ b/server/initializers/migrations/0090-videos-description.ts @@ -0,0 +1,25 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction, + queryInterface: Sequelize.QueryInterface, + sequelize: Sequelize.Sequelize, + db: any +}): Promise { + const q = utils.queryInterface + + const data = { + type: Sequelize.STRING(3000), + allowNull: false + } + await q.changeColumn('Videos', 'description', data) +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- cgit v1.2.3