Files
paralus/persistence/migrations/admindb/000017_authsrv_template.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

18 lines
812 B
SQL

CREATE TABLE IF NOT EXISTS authsrv_template (
id uuid default uuid_generate_v4() PRIMARY KEY,
name character varying(256) NOT NULL,
description character varying(512) NOT NULL,
created_at timestamp with time zone NOT NULL,
modified_at timestamp with time zone NOT NULL,
trash boolean NOT NULL,
type character varying(64) NOT NULL,
source text NOT NULL,
partner_id uuid NOT NULL REFERENCES authsrv_partner(id) DEFERRABLE INITIALLY DEFERRED
);
CREATE INDEX IF NOT EXISTS authsrv_template_name_274ef2d3 ON authsrv_template USING btree (name);
CREATE INDEX IF NOT EXISTS authsrv_template_name_274ef2d3_like ON authsrv_template USING btree (name varchar_pattern_ops);
CREATE INDEX IF NOT EXISTS authsrv_template_partner_id_2fcb0ded ON authsrv_template USING btree (partner_id);