File size: 740 Bytes
8678d19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'action_enum') THEN
CREATE TYPE action_enum AS ENUM ('CREATE', 'UPDATE', 'DELETE');
END IF;
END$$;
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'datatype_enum') THEN
CREATE TYPE datatype_enum AS ENUM ('string', 'external-id', 'url', 'commonsMedia', 'geo-shape', 'tabular-data', 'math', 'musical-notation', 'wikibase-item', 'wikibase-entityid', 'wikibase-property', 'wikibase-lexeme', 'wikibase-sense', 'wikibase-form', 'entity-schema', 'monolingualtext', 'globecoordinate', 'quantity', 'time', 'bad', 'unknown-values');
END IF;
END$$; |