mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
a11b4135fc
https://github.com/hasura/graphql-engine-mono/pull/1651 Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com> Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com> GitOrigin-RevId: cdb4a33cbb1a136bc30e8f0dd59aaae584d3a636
14 lines
472 B
SQL
14 lines
472 B
SQL
-- This migration adds versioning to metadata, used for optimistic locking in UIs.
|
|
-- TODO: Are there changes required in catalog_versions.txt
|
|
|
|
DO $$
|
|
BEGIN
|
|
BEGIN
|
|
ALTER TABLE hdb_catalog.hdb_metadata ADD COLUMN "resource_version" INTEGER NOT NULL DEFAULT 1 UNIQUE;
|
|
EXCEPTION
|
|
-- For pg 9.6 compatibility
|
|
WHEN duplicate_column THEN RAISE NOTICE 'column resource_version already exists in hdb_metadata';
|
|
END;
|
|
END;
|
|
$$
|