Skip to content

Commit

Permalink
titleにもインデックスを貼る用に
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 committed Jan 31, 2024
1 parent 5f0b891 commit 28561be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/database/src/database/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const migrationsClient = postgres(connectionString, {
const db = drizzle(migrationsClient, { logger: true });
await migrate(db, { migrationsFolder: './drizzle' });

await db.execute(
sql`CREATE INDEX IF NOT EXISTS idx_title_on_articles ON ${articles} USING pgroonga (title);`,
);
await db.execute(
sql`CREATE INDEX IF NOT EXISTS idx_body_on_articles ON ${articles} USING pgroonga (body);`,
);
Expand Down

0 comments on commit 28561be

Please sign in to comment.