-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docker-compose example to bypass setup command (close #33)
- Loading branch information
1 parent
c88e6dc
commit d38f02e
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
ALTER USER postgres WITH PASSWORD 'iglusecret'; | ||
CREATE DATABASE igludb OWNER postgres; | ||
\connect igludb; | ||
CREATE TYPE key_action AS ENUM ('CREATE', 'DELETE'); | ||
CREATE TYPE schema_action AS ENUM ('READ', 'BUMP', 'CREATE', 'CREATE_VENDOR'); | ||
CREATE TABLE iglu_permissions ( | ||
apikey UUID NOT NULL, | ||
vendor VARCHAR(128), | ||
wildcard BOOL NOT NULL, | ||
schema_action schema_action, | ||
key_action key_action[] NOT NULL, | ||
PRIMARY KEY (apikey) | ||
); | ||
CREATE TABLE iglu_schemas ( | ||
vendor VARCHAR(128) NOT NULL, | ||
name VARCHAR(128) NOT NULL, | ||
format VARCHAR(128) NOT NULL, | ||
model INTEGER NOT NULL, | ||
revision INTEGER NOT NULL, | ||
addition INTEGER NOT NULL, | ||
|
||
created_at TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP NOT NULL, | ||
is_public BOOLEAN NOT NULL, | ||
|
||
body JSON NOT NULL | ||
); | ||
CREATE TABLE iglu_drafts ( | ||
vendor VARCHAR(128) NOT NULL, | ||
name VARCHAR(128) NOT NULL, | ||
format VARCHAR(128) NOT NULL, | ||
version INTEGER NOT NULL, | ||
|
||
created_at TIMESTAMP NOT NULL, | ||
updated_at TIMESTAMP NOT NULL, | ||
is_public BOOLEAN NOT NULL, | ||
|
||
body JSON NOT NULL | ||
); |