mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: n1ru4l <14338007+n1ru4l@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Laurin Quast <laurinquast@googlemail.com>
28 lines
818 B
TypeScript
28 lines
818 B
TypeScript
import { type MigrationExecutor } from '../pg-migrator';
|
|
|
|
export default {
|
|
name: '2023.04.03T12.51.36.schema-versions-meta.sql',
|
|
run: ({ psql }) => psql`
|
|
CREATE TABLE
|
|
"schema_version_changes" (
|
|
"id" UUID PRIMARY KEY DEFAULT uuid_generate_v4 (),
|
|
"schema_version_id" UUID NOT NULL REFERENCES "schema_versions" ("id") ON DELETE CASCADE,
|
|
"severity_level" TEXT NOT NULL,
|
|
"change_type" TEXT NOT NULL,
|
|
"meta" jsonb NOT NULL,
|
|
"is_safe_based_on_usage" BOOLEAN NOT NULL
|
|
);
|
|
|
|
ALTER TABLE
|
|
"schema_versions"
|
|
ADD COLUMN
|
|
"has_persisted_schema_changes" BOOLEAN,
|
|
ADD COLUMN
|
|
"schema_composition_errors" jsonb,
|
|
ADD COLUMN
|
|
"composite_schema_sdl" TEXT,
|
|
ADD COLUMN
|
|
"previous_schema_version_id" UUID UNIQUE REFERENCES "schema_versions" ("id") ON DELETE SET NULL
|
|
;
|
|
`,
|
|
} satisfies MigrationExecutor;
|