diff options
Diffstat (limited to 'rust/migrations')
-rw-r--r-- | rust/migrations/2018-05-12-001226_init/up.sql | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql index 0952cec3..6d8471eb 100644 --- a/rust/migrations/2018-05-12-001226_init/up.sql +++ b/rust/migrations/2018-05-12-001226_init/up.sql @@ -67,11 +67,12 @@ CREATE TABLE container_rev ( -- extra_json JSON, name TEXT NOT NULL, - parent_ident_id BIGINT REFERENCES container_rev(id), publisher TEXT, issn TEXT -- TODO: varchar ); +CREATE INDEX container_rev_issn_idx ON container_rev(issn) WHERE issn IS NOT NULL; + CREATE TABLE container_ident ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), is_live BOOL NOT NULL DEFAULT false, @@ -122,8 +123,7 @@ CREATE TABLE release_rev ( work_ident_id UUID NOT NULL, -- FOREIGN KEY; see ALRTER below container_ident_id UUID REFERENCES container_ident(id), title TEXT NOT NULL, - license TEXT, -- TODO: ? - release_type TEXT NOT NULL, -- TODO: enum + release_type TEXT, -- TODO: enum date TEXT, -- XXX: datetime doi TEXT, -- TODO: identifier table? volume TEXT, @@ -131,6 +131,8 @@ CREATE TABLE release_rev ( issue TEXT ); +CREATE INDEX release_rev_doi_idx ON release_rev(doi) WHERE doi IS NOT NULL; + CREATE TABLE release_ident ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), is_live BOOL NOT NULL DEFAULT false, |