Files
paralus/persistence/migrations/admindb/000036_cluster_namespaces.up.sql
Akshay Gaikwad d88c82e0df fix: re-running admindb migration fails (#205)
Make all admindb migration queries re-entrance so re-running migration
would not fail.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-04-28 14:21:32 +05:30

12 lines
428 B
SQL

CREATE TABLE IF NOT EXISTS cluster_namespaces (
cluster_id uuid NOT NULL REFERENCES cluster_clusters(id) DEFERRABLE INITIALLY DEFERRED,
name varchar NOT NULL,
hash varchar NOT NULL,
deleted_at timestamp WITH time zone,
type varchar not null,
namespace jsonb not null,
conditions jsonb not null default '[]'::jsonb,
status jsonb not null default '{}'::jsonb,
PRIMARY KEY (cluster_id, name)
);