dnet-applications/libs/dnet-is-common/src/main/resources/sql/schema.sql

17 lines
394 B
SQL

CREATE TABLE vocabularies (
id text PRIMARY KEY,
name text NOT NULL,
description text
);
CREATE TABLE vocabulary_terms (
vocabulary text NOT NULL REFERENCES vocabularies(id),
code text NOT NULL,
name text NOT NULL,
encoding text DEFAULT 'OPENAIRE',
synonyms jsonb,
PRIMARY KEY (vocabulary, code)
);
CREATE INDEX ON vocabulary_terms (vocabulary);