Skip to content

Commit

Permalink
***pasword.data.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolicvs committed Sep 3, 2020
1 parent 4a720ad commit f618da2
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS users (
name varchar(50) ,
surname varchar(50),
email varchar(50) UNIQUE NOT NULL,
password varchar(50) NOT NULL,
password varchar(150) NOT NULL,
createdAt timestamp NOT NULL DEFAULT NOW(),
updatedAt timestamp
);
Expand Down Expand Up @@ -98,6 +98,23 @@ CREATE TABLE IF NOT EXISTS policy_fields(
updatedAt timestamp
);

CREATE TABLE IF NOT EXISTS policy_sources(
id serial PRIMARY KEY,
policy_id integer,
source_id integer,

CONSTRAINT policy_field_policy_id_fkey FOREIGN KEY (policy_id)
REFERENCES policies(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE CASCADE,

CONSTRAINT policy_source_source_id_fkkey FOREIGN KEY (source_id)
REFERENCES sources(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE CASCADE,

createdAt timestamp NOT NULL DEFAULT NOW(),
updatedAt timestamp
);


CREATE TABLE IF NOT EXISTS groups (
id serial PRIMARY KEY,
Expand Down

0 comments on commit f618da2

Please sign in to comment.