toar_controlled_vocabulary--0.1--0.2.sql 1.06 KiB
--
-- toardb/extension/toar_controlled_vocabulary/toar_controlled_vocabulary--0.2.sql
--
-- [Step to install]
--
-- 1.
--
-- INSTALL VERSION: '0.2'
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION toar_controlled_vocabulary" to load this file. \quit
-- Changelogs
-- ==========
-- Type of Change
CREATE TABLE IF NOT EXISTS CL_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 cl_enum_val_unique UNIQUE (enum_val)
);
INSERT INTO CL_vocabulary (enum_val, enum_str, enum_display_str) VALUES
(0, 'Created', 'created'),
(1, 'SingleValue', 'single value correction in metadata'),
(2, 'Comprehensive', 'comprehensive metadata revision'),
(3, 'Typo', 'typographic correction of metadata'),
(4, 'UnspecifiedData', 'unspecified data value corrections'),
(5, 'Replaced', 'replaced data with a new version'),
(6, 'Flagging', 'data value flagging');