-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
484e92d
commit 02f18fe
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
10 changes: 0 additions & 10 deletions
10
packages/migrations/src/actions/2024.12.22T00-00-00.improve-version-index.ts
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
packages/migrations/src/actions/2024.12.23T00-00-00.improve-version-index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { type MigrationExecutor } from '../pg-migrator'; | ||
|
||
// See https://github.com/graphql-hive/console/pull/6154 | ||
export default { | ||
name: '2024.12.23T00-00-00.improve-version-index.ts', | ||
noTransaction: true, | ||
run: ({ sql }) => [ | ||
{ | ||
name: `create "schema_log"."action" with "created_at" sort index`, | ||
query: sql`CREATE INDEX CONCURRENTLY idx_schema_log_action_created ON schema_log(action, created_at DESC);`, | ||
}, | ||
{ | ||
name: `create "schema_log"."action" + "service_name" index`, | ||
query: sql`CREATE INDEX CONCURRENTLY idx_schema_log_action_service ON schema_log(action, lower(service_name));`, | ||
}, | ||
], | ||
} satisfies MigrationExecutor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters