-- Migration from 022 to 023

DROP DOMAIN PUBLIC.NAME;
CREATE DOMAIN LONG_NAME AS TEXT;

ALTER TABLE IMAGE_DATA_SETS
  ALTER COLUMN IMAGE_LIBRARY_NAME type LONG_NAME,
  ALTER COLUMN IMAGE_LIBRARY_READER_NAME type LONG_NAME;

ALTER TABLE CHANNELS
  ALTER COLUMN CODE TYPE LONG_NAME,
  ALTER COLUMN LABEL TYPE LONG_NAME;

ALTER TABLE IMAGE_TRANSFORMATIONS
  ALTER COLUMN CODE TYPE LONG_NAME,
  ALTER COLUMN LABEL TYPE LONG_NAME;
  
ALTER TABLE FEATURE_DEFS
  ALTER COLUMN CODE TYPE LONG_NAME,
  ALTER COLUMN LABEL TYPE LONG_NAME;

ALTER TABLE FEATURE_VOCABULARY_TERMS
  ALTER COLUMN CODE TYPE LONG_NAME;