mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Cleanup DB indexes
This commit is contained in:
@@ -14,7 +14,7 @@ import { CONFIG, registerConfigChangedHandler } from './config'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const LAST_MIGRATION_VERSION = 465
|
||||
const LAST_MIGRATION_VERSION = 470
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
22
server/initializers/migrations/0470-cleaup-indexes.ts
Normal file
22
server/initializers/migrations/0470-cleaup-indexes.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user