------------------------------------------------------------------------------------
-- Change the length of descriptions to 2000 
------------------------------------------------------------------------------------
-- cerate new domain
CREATE DOMAIN DESCRIPTION_2000 AS VARCHAR(2000);
-- description 
ALTER TABLE CONTROLLED_VOCABULARIES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE DATA_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE CONTROLLED_VOCABULARY_TERMS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE EVENTS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE EVENTS ALTER COLUMN REASON TYPE DESCRIPTION_2000;
ALTER TABLE ATTACHMENTS ALTER COLUMN description TYPE DESCRIPTION_2000;
ALTER TABLE EXPERIMENT_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE FILE_FORMAT_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE GRID_CUSTOM_COLUMNS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE GROUPS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE LOCATOR_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE MATERIAL_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE DATA_SET_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE PROJECTS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE PROPERTY_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE SAMPLE_TYPES ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE AUTHORIZATION_GROUPS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
ALTER TABLE FILTERS ALTER COLUMN DESCRIPTION TYPE DESCRIPTION_2000;
-- section
ALTER TABLE EXPERIMENT_TYPE_PROPERTY_TYPES ALTER COLUMN SECTION TYPE DESCRIPTION_2000;
ALTER TABLE MATERIAL_TYPE_PROPERTY_TYPES ALTER COLUMN SECTION TYPE DESCRIPTION_2000;
ALTER TABLE SAMPLE_TYPE_PROPERTY_TYPES ALTER COLUMN SECTION TYPE DESCRIPTION_2000;
ALTER TABLE DATA_SET_TYPE_PROPERTY_TYPES ALTER COLUMN SECTION TYPE DESCRIPTION_2000;
-- reason
ALTER TABLE INVALIDATIONS ALTER COLUMN REASON TYPE DESCRIPTION_2000;
-- delete unused domain
DROP DOMAIN DESCRIPTION_1000;