addition of new dashboard
This commit is contained in:
14
backend/db/migrations/000005 - agreement-content.sql
Normal file
14
backend/db/migrations/000005 - agreement-content.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- DROP TABLE IF EXISTS public.agreement_content CASCADE;
|
||||
CREATE TABLE public.agreement_content (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT REFERENCES public.user(id),
|
||||
title TEXT NOT NULL,
|
||||
markdown TEXT NOT NULL,
|
||||
hash TEXT NOT NULL,
|
||||
created_ts TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_ts TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
CONSTRAINT uniq__agreement_content UNIQUE NULLS NOT DISTINCT (user_id, title)
|
||||
);
|
||||
CREATE INDEX idx__public__agreement_content__user_id ON public.agreement_content (user_id);
|
||||
CREATE INDEX idx__public__agreement_content__created_ts ON public.agreement_content (created_ts);
|
||||
CREATE INDEX idx__public__agreement_content__updated_ts ON public.agreement_content (updated_ts);
|
||||
Reference in New Issue
Block a user