-- -- contrib/toar_controlled_vocabulary.sql -- -- [Step to install] -- -- 1. -- -- INSTALL VERSION: '0.1' -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION toar_controlled_vocabulary" to load this file. \quit CREATE TABLE IF NOT EXISTS RC_vocabulary ( enum_val INT NOT NULL, enum_str character varying(128) NOT NULL, PRIMARY KEY(enum_val, enum_str) ); INSERT INTO RC_vocabulary (enum_val, enum_str) VALUES (0, 'PointOfContact'), (1, 'PrincipalInvestigator'), (2, 'Originator'), (3, 'Contributor'), (4, 'Collaborator'), (5, 'ResourceProvider'); CREATE TABLE IF NOT EXISTS RS_vocabulary ( enum_val INT NOT NULL, enum_str character varying(128) NOT NULL, PRIMARY KEY(enum_val, enum_str) ); INSERT INTO RS_vocabulary (enum_val, enum_str) VALUES (0, 'active'), (1, 'inactive'), (2, 'unknown');