From 51539e95d954867d5c4561ac56843105253db79c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 18 May 2020 09:43:36 +0200 Subject: Fix migrations --- .../migrations/0485-video-file-metadata.ts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 server/initializers/migrations/0485-video-file-metadata.ts diff --git a/server/initializers/migrations/0485-video-file-metadata.ts b/server/initializers/migrations/0485-video-file-metadata.ts new file mode 100644 index 000000000..5d95be024 --- /dev/null +++ b/server/initializers/migrations/0485-video-file-metadata.ts @@ -0,0 +1,30 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction + queryInterface: Sequelize.QueryInterface + sequelize: Sequelize.Sequelize +}): Promise { + + const metadata = { + type: Sequelize.JSONB, + allowNull: true + } + await utils.queryInterface.addColumn('videoFile', 'metadata', metadata) + + const metadataUrl = { + type: Sequelize.STRING, + allowNull: true + } + await utils.queryInterface.addColumn('videoFile', 'metadataUrl', metadataUrl) + +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- cgit v1.2.3