|
953 | 953 | 1719914228
|
954 | 954 | ],
|
955 | 955 | "PreCreation": false
|
| 956 | + }, |
| 957 | + "v5.6.0": { |
| 958 | + "RootID": 1000000027, |
| 959 | + "LeafIDs": [ |
| 960 | + 1719914228 |
| 961 | + ], |
| 962 | + "PreCreation": false |
956 | 963 | }
|
957 | 964 | }
|
958 | 965 | },
|
|
1936 | 1943 | 1686315964
|
1937 | 1944 | ],
|
1938 | 1945 | "PreCreation": false
|
| 1946 | + }, |
| 1947 | + "v5.6.0": { |
| 1948 | + "RootID": 1000000033, |
| 1949 | + "LeafIDs": [ |
| 1950 | + 1686315964 |
| 1951 | + ], |
| 1952 | + "PreCreation": false |
1939 | 1953 | }
|
1940 | 1954 | }
|
1941 | 1955 | },
|
@@ -11327,6 +11341,101 @@
|
11327 | 11341 | ],
|
11328 | 11342 | "IsCreateIndexConcurrently": false,
|
11329 | 11343 | "IndexMetadata": null
|
| 11344 | + }, |
| 11345 | + { |
| 11346 | + "ID": 1720651147, |
| 11347 | + "Name": "add ips to sub_repo_perms_table", |
| 11348 | + "UpQuery": "-- Add the new 'ips' column to the sub_repo_permissions table\nALTER TABLE IF EXISTS ONLY sub_repo_permissions\n ADD COLUMN IF NOT EXISTS ips text[];\n\n-- Remove the check constraint to ensure ips is either NULL or has the same length as paths\nALTER TABLE IF EXISTS ONLY sub_repo_permissions\n DROP CONSTRAINT IF EXISTS ips_paths_length_check;\n\n-- Add a check constraint to ensure ips is either NULL or has the same length as paths\nALTER TABLE IF EXISTS ONLY sub_repo_permissions\n ADD CONSTRAINT ips_paths_length_check\n CHECK (\n ips IS NULL\n OR (\n array_length(ips, 1) = array_length(paths, 1)\n AND NOT '' = ANY(ips) -- Don't allow empty strings\n )\n );\n\n-- Add a comment explaining the new column\nCOMMENT ON COLUMN sub_repo_permissions.ips IS 'IP addresses corresponding to each path. IP in slot 0 in the array corresponds to path the in slot 0 of the path array, etc. NULL if not yet migrated, empty array for no IP restrictions.';", |
| 11349 | + "DownQuery": "-- Remove the check constraint to ensure ips is either NULL or has the same length as paths\nALTER TABLE IF EXISTS ONLY sub_repo_permissions\n DROP CONSTRAINT IF EXISTS ips_paths_length_check;\n\n-- Remove the new 'ips' column from the sub_repo_permissions table\nALTER TABLE IF EXISTS ONLY sub_repo_permissions\n DROP COLUMN IF EXISTS ips;", |
| 11350 | + "Privileged": false, |
| 11351 | + "NonIdempotent": false, |
| 11352 | + "Parents": [ |
| 11353 | + 1720165387 |
| 11354 | + ], |
| 11355 | + "IsCreateIndexConcurrently": false, |
| 11356 | + "IndexMetadata": null |
| 11357 | + }, |
| 11358 | + { |
| 11359 | + "ID": 1721281606, |
| 11360 | + "Name": "saved searches metadata", |
| 11361 | + "UpQuery": "ALTER TABLE saved_searches ADD COLUMN IF NOT EXISTS created_by integer REFERENCES users (id) ON DELETE SET NULL;\nALTER TABLE saved_searches ADD COLUMN IF NOT EXISTS updated_by integer REFERENCES users (id) ON DELETE SET NULL;\nALTER TABLE saved_searches ADD COLUMN IF NOT EXISTS draft boolean NOT NULL DEFAULT false;\nALTER TABLE saved_searches ADD COLUMN IF NOT EXISTS visibility_secret boolean NOT NULL DEFAULT true;", |
| 11362 | + "DownQuery": "ALTER TABLE saved_searches DROP COLUMN IF EXISTS created_by;\nALTER TABLE saved_searches DROP COLUMN IF EXISTS updated_by;\nALTER TABLE saved_searches DROP COLUMN IF EXISTS draft;\nALTER TABLE saved_searches DROP COLUMN IF EXISTS visibility_secret;", |
| 11363 | + "Privileged": false, |
| 11364 | + "NonIdempotent": false, |
| 11365 | + "Parents": [ |
| 11366 | + 1720165387 |
| 11367 | + ], |
| 11368 | + "IsCreateIndexConcurrently": false, |
| 11369 | + "IndexMetadata": null |
| 11370 | + }, |
| 11371 | + { |
| 11372 | + "ID": 1719555230, |
| 11373 | + "Name": "deprecate_saved_searches_notifs", |
| 11374 | + "UpQuery": "ALTER TABLE saved_searches ALTER COLUMN notify_owner SET DEFAULT false;\nALTER TABLE saved_searches ALTER COLUMN notify_slack SET DEFAULT false;", |
| 11375 | + "DownQuery": "-- no default value\nALTER TABLE saved_searches ALTER COLUMN notify_owner DROP DEFAULT;\nALTER TABLE saved_searches ALTER COLUMN notify_slack DROP DEFAULT;", |
| 11376 | + "Privileged": false, |
| 11377 | + "NonIdempotent": false, |
| 11378 | + "Parents": [ |
| 11379 | + 1717699555 |
| 11380 | + ], |
| 11381 | + "IsCreateIndexConcurrently": false, |
| 11382 | + "IndexMetadata": null |
| 11383 | + }, |
| 11384 | + { |
| 11385 | + "ID": 1719691538, |
| 11386 | + "Name": "add_prompts", |
| 11387 | + "UpQuery": "CREATE TABLE IF NOT EXISTS prompts (\n id serial PRIMARY KEY,\n\n name citext NOT NULL CONSTRAINT prompts_name_max_length CHECK (char_length(name::text) \u003c= 255) CONSTRAINT prompts_name_valid_chars CHECK (name ~ '^[a-zA-Z0-9](?:[a-zA-Z0-9]|[-.](?=[a-zA-Z0-9]))*-?$'::citext),\n description text NOT NULL CONSTRAINT prompts_description_max_length CHECK (char_length(description) \u003c= 1024*50),\n definition_text text NOT NULL CONSTRAINT prompts_definition_text_max_length CHECK (char_length(definition_text) \u003c= 1024*100),\n draft boolean NOT NULL DEFAULT false,\n visibility_secret boolean NOT NULL DEFAULT true,\n\n owner_user_id integer REFERENCES users(id) ON DELETE CASCADE,\n owner_org_id integer REFERENCES orgs(id) ON DELETE CASCADE,\n\n created_by integer NULL REFERENCES users (id) ON DELETE SET NULL,\n created_at timestamp with time zone NOT NULL DEFAULT now(),\n updated_by integer NULL REFERENCES users (id) ON DELETE SET NULL,\n updated_at timestamp with time zone NOT NULL DEFAULT now(),\n\n CONSTRAINT prompts_has_valid_owner CHECK ((((owner_user_id IS NOT NULL) AND (owner_org_id IS NULL)) OR ((owner_org_id IS NOT NULL) AND (owner_user_id IS NULL))))\n);\n\nCREATE UNIQUE INDEX IF NOT EXISTS prompts_name_is_unique_in_owner_user ON prompts (owner_user_id, name) WHERE owner_user_id IS NOT NULL;\nCREATE UNIQUE INDEX IF NOT EXISTS prompts_name_is_unique_in_owner_org ON prompts (owner_org_id, name) WHERE owner_org_id IS NOT NULL;\n\nCREATE OR REPLACE VIEW prompts_view AS\n SELECT\n prompts.*,\n COALESCE(users.username, orgs.name) || '/' || prompts.name AS name_with_owner\n FROM prompts\n LEFT JOIN users ON users.id = prompts.owner_user_id\n LEFT JOIN orgs ON orgs.id = prompts.owner_org_id;", |
| 11388 | + "DownQuery": "DROP VIEW IF EXISTS prompts_view;\n\nDROP INDEX IF EXISTS prompts_name_is_unique_in_owner_user;\nDROP INDEX IF EXISTS prompts_name_is_unique_in_owner_org;\n\nDROP TABLE IF EXISTS prompts;", |
| 11389 | + "Privileged": false, |
| 11390 | + "NonIdempotent": false, |
| 11391 | + "Parents": [ |
| 11392 | + 1719555230 |
| 11393 | + ], |
| 11394 | + "IsCreateIndexConcurrently": false, |
| 11395 | + "IndexMetadata": null |
| 11396 | + }, |
| 11397 | + { |
| 11398 | + "ID": 1721251474, |
| 11399 | + "Name": "create gin index for regex kvps", |
| 11400 | + "UpQuery": "-- Perform migration here.\n--\n-- See /migrations/README.md. Highlights:\n-- * Make migrations idempotent (use IF EXISTS)\n-- * Make migrations backwards-compatible (old readers/writers must continue to work)\n-- * If you are using CREATE INDEX CONCURRENTLY, then make sure that only one statement\n-- is defined per file, and that each such statement is NOT wrapped in a transaction.\n-- Each such migration must also declare \"createIndexConcurrently: true\" in their\n-- associated metadata.yaml file.\n-- * If you are modifying Postgres extensions, you must also declare \"privileged: true\"\n-- in the associated metadata.yaml file.\n\nCREATE INDEX IF NOT EXISTS repo_kvps_trgm_idx ON repo_kvps\nUSING gin (key gin_trgm_ops, value gin_trgm_ops);", |
| 11401 | + "DownQuery": "DROP INDEX IF EXISTS repo_kvps_trgm_idx;", |
| 11402 | + "Privileged": false, |
| 11403 | + "NonIdempotent": false, |
| 11404 | + "Parents": [ |
| 11405 | + 1719555230, |
| 11406 | + 1720165387 |
| 11407 | + ], |
| 11408 | + "IsCreateIndexConcurrently": false, |
| 11409 | + "IndexMetadata": null |
| 11410 | + }, |
| 11411 | + { |
| 11412 | + "ID": 1721814902, |
| 11413 | + "Name": "github_app_creator_id", |
| 11414 | + "UpQuery": "ALTER TABLE IF EXISTS github_apps\n ADD COLUMN IF NOT EXISTS creator_id BIGINT DEFAULT 0;\n\nALTER TABLE IF EXISTS github_apps\n ALTER COLUMN creator_id SET NOT NULL;", |
| 11415 | + "DownQuery": "ALTER TABLE IF EXISTS github_apps DROP COLUMN IF EXISTS creator_id;", |
| 11416 | + "Privileged": false, |
| 11417 | + "NonIdempotent": false, |
| 11418 | + "Parents": [ |
| 11419 | + 1719691538, |
| 11420 | + 1720651147, |
| 11421 | + 1721251474, |
| 11422 | + 1721281606 |
| 11423 | + ], |
| 11424 | + "IsCreateIndexConcurrently": false, |
| 11425 | + "IndexMetadata": null |
| 11426 | + }, |
| 11427 | + { |
| 11428 | + "ID": 1722348497, |
| 11429 | + "Name": "exhaustive search jobs add column", |
| 11430 | + "UpQuery": "ALTER TABLE exhaustive_search_jobs ADD COLUMN IF NOT EXISTS is_aggregated boolean NOT NULL DEFAULT false;", |
| 11431 | + "DownQuery": "ALTER TABLE exhaustive_search_jobs DROP COLUMN IF EXISTS is_aggregated;", |
| 11432 | + "Privileged": false, |
| 11433 | + "NonIdempotent": false, |
| 11434 | + "Parents": [ |
| 11435 | + 1721814902 |
| 11436 | + ], |
| 11437 | + "IsCreateIndexConcurrently": false, |
| 11438 | + "IndexMetadata": null |
11330 | 11439 | }
|
11331 | 11440 | ],
|
11332 | 11441 | "BoundsByRev": {
|
|
11597 | 11706 | 1720165387
|
11598 | 11707 | ],
|
11599 | 11708 | "PreCreation": false
|
| 11709 | + }, |
| 11710 | + "v5.6.0": { |
| 11711 | + "RootID": 1648051770, |
| 11712 | + "LeafIDs": [ |
| 11713 | + 1722348497 |
| 11714 | + ], |
| 11715 | + "PreCreation": false |
11600 | 11716 | }
|
11601 | 11717 | }
|
11602 | 11718 | }
|
|
0 commit comments