Skip to content

Commit

Permalink
⚡ Add index on reviewState column on moderation_subject_status table (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
foysalit authored Oct 1, 2024
1 parent a8c6b89 commit cafa8a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Kysely } from 'kysely'

export async function up(db: Kysely<unknown>): Promise<void> {
await db.schema
.createIndex('moderation_subject_status_review_state_idx')
.on('moderation_subject_status')
.column('reviewState')
.execute()
}

export async function down(db: Kysely<unknown>): Promise<void> {
await db.schema
.dropIndex('moderation_subject_status_review_state_idx')
.execute()
}
1 change: 1 addition & 0 deletions packages/ozone/src/db/migrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit cafa8a1

Please sign in to comment.