import { BaseSchema } from '@adonisjs/lucid/schema' /** * Search matches the prober's inner names too (SearchService): a trigram * index on them, only where there is one. Built concurrently: the catalog * keeps taking batches meanwhile. */ export default class extends BaseSchema { static disableTransactions = true async up() { this.schema.raw(`CREATE INDEX CONCURRENTLY IF NOT EXISTS releases_inner_name_trgm ON releases USING gin (inner_name gin_trgm_ops) WHERE inner_name IS NOT NULL`) } async down() { this.schema.raw(`DROP INDEX CONCURRENTLY IF EXISTS releases_inner_name_trgm`) } }