diff --git a/packages/ozone/src/db/migrations/20241001T205730722Z-subject-status-review-state-index.ts b/packages/ozone/src/db/migrations/20241001T205730722Z-subject-status-review-state-index.ts new file mode 100644 index 00000000000..a4571051b72 --- /dev/null +++ b/packages/ozone/src/db/migrations/20241001T205730722Z-subject-status-review-state-index.ts @@ -0,0 +1,15 @@ +import { Kysely } from 'kysely' + +export async function up(db: Kysely): Promise { + await db.schema + .createIndex('moderation_subject_status_review_state_idx') + .on('moderation_subject_status') + .column('reviewState') + .execute() +} + +export async function down(db: Kysely): Promise { + await db.schema + .dropIndex('moderation_subject_status_review_state_idx') + .execute() +} diff --git a/packages/ozone/src/db/migrations/index.ts b/packages/ozone/src/db/migrations/index.ts index 91fa5131fb1..658f5bc71da 100644 --- a/packages/ozone/src/db/migrations/index.ts +++ b/packages/ozone/src/db/migrations/index.ts @@ -13,3 +13,4 @@ export * as _20240430T211332580Z from './20240521T211332580Z-member' export * as _20240814T003647759Z from './20240814T003647759Z-event-created-at-index' export * as _20240903T205730722Z from './20240903T205730722Z-add-template-lang' export * as _20240904T205730722Z from './20240904T205730722Z-add-subject-did-index' +export * as _20241001T205730722Z from './20241001T205730722Z-subject-status-review-state-index'