1 import * as Sequelize from 'sequelize'
3 async function up (utils: {
4 transaction: Sequelize.Transaction
5 queryInterface: Sequelize.QueryInterface
6 sequelize: Sequelize.Sequelize
10 'accounts_application_id',
14 'account_video_rates_video_id_account_id',
15 'account_video_rates_video_id_account_id_type',
17 'account_follows_account_id_target_account_id',
18 'account_follow_account_id_target_account_id',
19 'account_follow_account_id',
20 'account_follow_target_account_id',
21 'account_follows_account_id',
22 'account_follows_target_account_id',
24 'o_auth_clients_client_id',
25 'o_auth_clients_client_id_client_secret',
27 'o_auth_tokens_access_token',
28 'o_auth_tokens_refresh_token',
29 'o_auth_tokens_o_auth_client_id',
30 'o_auth_tokens_user_id',
48 'video_abuses_reporter_account_id',
49 'video_abuses_video_id',
51 'blacklisted_videos_video_id',
53 'video_channels_account_id',
55 'video_files_info_hash',
56 'video_files_video_id',
58 'video_shares_account_id',
59 'video_shares_video_id',
65 for (const indexName of indexNames) {
66 await utils.sequelize.query('DROP INDEX IF EXISTS "' + indexName + '";')
69 await utils.sequelize.query('ALTER TABLE "account" DROP CONSTRAINT IF EXISTS "actorId_foreign_idx";')
70 await utils.sequelize.query('ALTER TABLE "videoChannel" DROP CONSTRAINT IF EXISTS "actorId_foreign_idx";')
71 await utils.sequelize.query('ALTER TABLE "videoShare" DROP CONSTRAINT IF EXISTS "VideoShares_videoId_fkey";')
73 await utils.sequelize.query('DROP TABLE IF EXISTS "videoChannelShare";')
76 function down (options) {
77 throw new Error('Not implemented.')