Cleanup DB indexes

pull/2400/head
Chocobozzz 2020-01-10 10:41:05 +01:00
parent 2d0d88a0cb
commit 6fd8c4da26
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 23 additions and 1 deletions

View File

@ -14,7 +14,7 @@ import { CONFIG, registerConfigChangedHandler } from './config'
// ---------------------------------------------------------------------------
const LAST_MIGRATION_VERSION = 465
const LAST_MIGRATION_VERSION = 470
// ---------------------------------------------------------------------------

View File

@ -0,0 +1,22 @@
import * as Sequelize from 'sequelize'
async function up (utils: {
transaction: Sequelize.Transaction,
queryInterface: Sequelize.QueryInterface,
sequelize: Sequelize.Sequelize,
db: any
}): Promise<void> {
await utils.sequelize.query('DROP INDEX IF EXISTS video_share_account_id;')
await utils.sequelize.query('DROP INDEX IF EXISTS video_published_at;')
await utils.sequelize.query('ALTER TABLE "avatar" DROP COLUMN IF EXISTS "avatarId"')
}
function down (options) {
throw new Error('Not implemented.')
}
export {
up,
down
}