From 6913f69134947432a192890b2de7c2d48094e85c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Feb 2019 14:33:47 +0100 Subject: Move original publication date in advanced settings --- .../migrations/0340-add-originally-published-at.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'server/initializers/migrations') diff --git a/server/initializers/migrations/0340-add-originally-published-at.ts b/server/initializers/migrations/0340-add-originally-published-at.ts index ab8d66854..fe4f4a5f9 100644 --- a/server/initializers/migrations/0340-add-originally-published-at.ts +++ b/server/initializers/migrations/0340-add-originally-published-at.ts @@ -6,19 +6,13 @@ async function up (utils: { sequelize: Sequelize.Sequelize }): Promise { - { - const data = { - type: Sequelize.DATE, - allowNull: true, - defaultValue: Sequelize.NOW - } - await utils.queryInterface.addColumn('video', 'originallyPublishedAt', data) + const data = { + type: Sequelize.DATE, + allowNull: true, + defaultValue: null } + await utils.queryInterface.addColumn('video', 'originallyPublishedAt', data) - { - const query = 'UPDATE video SET "originallyPublishedAt" = video."publishedAt"' - await utils.sequelize.query(query) - } } function down (options) { -- cgit v1.2.3