Skip to content

Commit

Permalink
**
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozcan Aytac; Insylva project committed Jul 24, 2020
1 parent bf7f818 commit 6648b29
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ CREATE TABLE IF NOT EXISTS policy_field(
);


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

name varchar(50) NOT NULL,
Expand All @@ -101,7 +101,7 @@ CREATE TABLE IF NOT EXISTS group (
updatedAt timestamp
);

CREATE TABLE IF NOT EXISTS group_policy (
CREATE TABLE IF NOT EXISTS groups_policy (
group_id integer,
policy_id integer,

Expand All @@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS group_policy (
ON UPDATE NO ACTION ON DELETE NO ACTION,

CONSTRAINT group_policy_group_id_fkey FOREIGN KEY (group_id)
REFERENCES group(id) MATCH SIMPLE
REFERENCES groups(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,

createdAt timestamp NOT NULL DEFAULT NOW(),
Expand All @@ -126,13 +126,12 @@ CREATE TABLE IF NOT EXISTS group_user (
ON UPDATE NO ACTION ON DELETE NO ACTION,

CONSTRAINT group_user_group_id_fkey FOREIGN KEY (group_id)
REFERENCES group(id) MATCH SIMPLE
REFERENCES groups(id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,

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

/* CREATE TABLE IF NOT EXISTS policy_user(
id serial PRIMARY KEY,
policy_id integer,
Expand Down

0 comments on commit 6648b29

Please sign in to comment.