Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Dec 23, 2024
1 parent 484e92d commit 02f18fe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.

This file was deleted.

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;
3 changes: 1 addition & 2 deletions packages/migrations/src/run-pg-migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import migration_2024_06_11T10_10_00_ms_teams_webhook from './actions/2024.06.11
import migration_2024_07_16T13_44_00_oidc_only_access from './actions/2024.07.16T13-44-00.oidc-only-access';
import migration_2024_07_17T00_00_00_app_deployments from './actions/2024.07.17T00-00-00.app-deployments';
import migration_2024_07_23T_09_36_00_schema_cleanup_tracker from './actions/2024.07.23T09.36.00.schema-cleanup-tracker';
import migration_2024_12_22_improve_version_index from './actions/2024.12.22T00-00-00.improve-version-index';
import { runMigrations } from './pg-migrator';

export const runPGMigrations = async (args: { slonik: DatabasePool; runTo?: string }) =>
Expand Down Expand Up @@ -148,6 +147,6 @@ export const runPGMigrations = async (args: { slonik: DatabasePool; runTo?: stri
await import('./actions/2024.11.12T00-00-00.supertokens-9.1'),
await import('./actions/2024.11.12T00-00-00.supertokens-9.2'),
await import('./actions/2024.11.12T00-00-00.supertokens-9.3'),
migration_2024_12_22_improve_version_index,
await import('./actions/2024.12.23T00-00-00.improve-version-index'),
],
});

0 comments on commit 02f18fe

Please sign in to comment.