Clean up SQL

This commit is contained in:
Janus C. H. Knudsen 2025-02-03 17:58:51 +01:00
parent 5c181936d8
commit cdd645bb3b
4 changed files with 16 additions and 80 deletions

View file

@ -13,34 +13,5 @@ ALTER DEFAULT PRIVILEGES IN SCHEMA ptmain
GRANT ALL PRIVILEGES ON TABLES TO sathumper;
-- prod.app_configuration definition
-- Drop table
-- DROP TABLE prod.app_configuration;
CREATE TABLE prod.app_configuration (
id bigserial NOT NULL,
"key" varchar(255) NOT NULL,
value text NULL,
"label" varchar(255) NULL,
content_type varchar(255) DEFAULT 'text/plain'::character varying NULL,
expires_at timestamptz NULL,
created_at timestamptz DEFAULT CURRENT_TIMESTAMP NULL,
modified_at timestamptz DEFAULT CURRENT_TIMESTAMP NULL,
etag uuid DEFAULT gen_random_uuid() NULL,
CONSTRAINT app_configuration_pkey PRIMARY KEY (id)
);
CREATE UNIQUE INDEX idx_prod_unique_key_label ON prod.app_configuration USING btree (key, COALESCE(label, ''::character varying));