Files
jlinc-server/backend/db/migrations/000022 - system-identity.sql

9 lines
339 B
SQL

CREATE TABLE IF NOT EXISTS system.settings (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
created_ts TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
INSERT INTO system.settings (id)
SELECT gen_random_uuid()
WHERE NOT EXISTS (SELECT 1 FROM system.settings);
CREATE INDEX idx__system__settings__id ON system.settings (id);