Skip to content

Commit

Permalink
issue #18 - updated the inital db
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarconr committed Feb 20, 2020
1 parent ac83565 commit 407224e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions unleash-server/migrations/sql/001-initial-schema.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ CREATE TABLE strategies (
CREATE TABLE features (
created_at timestamp default now(),
name varchar(255) PRIMARY KEY NOT NULL,
enabled integer default 0,
strategy_name varchar(255) references strategies(name),
parameters json
);

CREATE TABLE events (
id serial primary key,
created_at timestamp default now(),
type varchar(255) NOT NULL,
data json
);

GRANT ALL ON TABLE events TO unleash_user;
GRANT ALL ON TABLE features TO unleash_user;
GRANT ALL ON TABLE strategies TO unleash_user;
GRANT USAGE, SELECT ON SEQUENCE events_id_seq TO unleash_user;

0 comments on commit 407224e

Please sign in to comment.