Skip to content
Snippets Groups Projects
Commit b5b51424 authored by Sabine Schröder's avatar Sabine Schröder
Browse files

#3: extension toar_controlled_vocabulary has been created (first examples role...

#3: extension toar_controlled_vocabulary has been created (first examples role codes and role status)
parent 5009a3f2
No related branches found
No related tags found
No related merge requests found
Pipeline #38312 passed
EXTENSION = toar_controlled_vocabulary
DATA = toar_controlled_vocabulary--0.1.sql
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
--
-- 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');
# toar_controlled_vocabulary extension
comment = 'TOAR controlled vocabulary'
default_version = '0.1'
module_pathname = '$libdir/toar_controlled_vocabulary-0.1'
relocatable = false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment