From 534556052ed4aab539325dccaa16c6dd2acecf73 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Mar 2021 11:24:16 +0100 Subject: Optimize views sort sql query --- server/initializers/migrations/0610-views-index.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 server/initializers/migrations/0610-views-index.ts (limited to 'server/initializers/migrations') diff --git a/server/initializers/migrations/0610-views-index.ts b/server/initializers/migrations/0610-views-index.ts new file mode 100644 index 000000000..02ee21172 --- /dev/null +++ b/server/initializers/migrations/0610-views-index.ts @@ -0,0 +1,20 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction + queryInterface: Sequelize.QueryInterface + sequelize: Sequelize.Sequelize + db: any +}): Promise { + + await utils.sequelize.query('DROP INDEX IF EXISTS video_views;') +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- cgit v1.2.3