Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storage): added missing index for targets.project_id #6256

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { type MigrationExecutor } from '../pg-migrator';

// https://github.com/graphql-hive/console/issues/6249
export default {
name: '2025.01.03T00-00-00.improve-targets-index.ts',
noTransaction: true,
run: ({ sql }) => [
{
name: `create "targets"."idx_targets_project_id_id" lookup index`,
query: sql`CREATE INDEX IF NOT EXISTS CONCURRENTLY idx_targets_project_id_id ON targets(project_id, id);`,
},
],
} satisfies MigrationExecutor;
1 change: 1 addition & 0 deletions packages/migrations/src/run-pg-migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,6 @@ export const runPGMigrations = async (args: { slonik: DatabasePool; runTo?: stri
await import('./actions/2024.12.23T00-00-00.improve-version-index'),
await import('./actions/2024.12.24T00-00-00.improve-version-index-2'),
await import('./actions/2024.12.27T00.00.00.create-preflight-scripts'),
await import('./actions/2025.01.03T00-00-00.improve-targets-index'),
],
});
Loading