diff --git a/extension/toar_controlled_vocabulary/toar_controlled_vocabulary--0.2--0.2.5.sql b/extension/toar_controlled_vocabulary/toar_controlled_vocabulary--0.2--0.2.5.sql new file mode 100644 index 0000000000000000000000000000000000000000..0dfbd608e61853e6f60677f55308c17fc29de1d6 --- /dev/null +++ b/extension/toar_controlled_vocabulary/toar_controlled_vocabulary--0.2--0.2.5.sql @@ -0,0 +1,29 @@ +-- +-- toardb/extension/toar_controlled_vocabulary/toar_controlled_vocabulary--0.2.5.sql +-- +-- [Step to install] +-- +-- 1. +-- + +-- INSTALL VERSION: '0.2.5' + +-- complain if script is sourced in psql, rather than via CREATE EXTENSION +\echo Use "CREATE EXTENSION toar_controlled_vocabulary" to load this file. \quit + +-- Annotation +-- ========== + +-- Kind of Annotation + +CREATE TABLE IF NOT EXISTS AK_vocabulary ( + enum_val INT NOT NULL, + enum_str character varying(128) NOT NULL, + enum_display_str character varying(128) NOT NULL, + PRIMARY KEY(enum_val, enum_str), + CONSTRAINT ak_enum_val_unique UNIQUE (enum_val) +; + +INSERT INTO AK_vocabulary (enum_val, enum_str, enum_display_str) VALUES + (0, 'User', 'user comment'), + (1, 'Provider', 'provider comment');