Eric Bower
·
11 Aug 22
20220811_add_feature.sql
1CREATE TABLE IF NOT EXISTS feature_flags (
2 id uuid NOT NULL DEFAULT uuid_generate_v4(),
3 user_id uuid NOT NULL,
4 name character varying(50),
5 created_at timestamp without time zone NOT NULL DEFAULT NOW(),
6 CONSTRAINT user_features_unique_name UNIQUE (user_id, name),
7 CONSTRAINT feature_flags_pkey PRIMARY KEY (id),
8 CONSTRAINT fk_features_user_post
9 FOREIGN KEY(user_id)
10 REFERENCES app_users(id)
11 ON DELETE CASCADE
12 ON UPDATE CASCADE
13);