diff --git a/src/migrations/20220127134126_account-explicit-index.js b/src/migrations/20220127134126_account-explicit-index.js new file mode 100644 index 00000000..240bb7db --- /dev/null +++ b/src/migrations/20220127134126_account-explicit-index.js @@ -0,0 +1,10 @@ +const kIndexName = 'idx_tweets_account_explicit'; + +exports.up = (knex) => { + return knex.schema + .raw(`create index if not exists ${kIndexName} on statuses using BTREE (account, explicit)`); +}; + +exports.down = (knex) => { + return knex.schema.raw(`drop index if exists ${kIndexName}`); +};