Files
paralus/persistence/migrations/admindb/000035_cluster_project_cluster.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

8 lines
362 B
SQL

CREATE TABLE IF NOT EXISTS cluster_project_cluster (
project_id uuid NOT NULL,
cluster_id uuid NOT NULL REFERENCES cluster_clusters(id) DEFERRABLE INITIALLY DEFERRED,
trash boolean NOT NULL default false
);
CREATE INDEX IF NOT EXISTS cluster_project_cluster_project_id_cluster_id_key ON cluster_project_cluster USING btree (project_id, cluster_id);