From 99d80b618c4fed94684274553b247a66b80b063e Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 15 Sep 2008 11:32:09 +0000 Subject: [PATCH] LMS-478 some 'lost' changes from Iza SVN: 8310 --- .../postgresql/migration/migration-025-026.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openbis/source/sql/postgresql/migration/migration-025-026.sql b/openbis/source/sql/postgresql/migration/migration-025-026.sql index 07c8e6460c9..330d09726ff 100644 --- a/openbis/source/sql/postgresql/migration/migration-025-026.sql +++ b/openbis/source/sql/postgresql/migration/migration-025-026.sql @@ -1,9 +1,16 @@ +-- JAVA ch.systemsx.cisd.lims.server.dataaccess.migration.MigrationStepFrom025To026 -- Remove ID column from SAMPLE_INPUTS table DROP SEQUENCE SAMPLE_INPUT_ID_SEQ; ALTER TABLE SAMPLE_INPUTS DROP CONSTRAINT SAIN_PK; ALTER TABLE SAMPLE_INPUTS DROP COLUMN ID; ALTER TABLE SAMPLE_INPUTS ADD CONSTRAINT SAIN_PK PRIMARY KEY(SAMP_ID,PROC_ID); +-- Remove ID column from SAMPLE_MATERIAL_BATCHES table +DROP SEQUENCE SAMPLE_MATERIAL_BATCH_ID_SEQ; +ALTER TABLE SAMPLE_MATERIAL_BATCHES DROP CONSTRAINT SAMB_PK; +ALTER TABLE SAMPLE_MATERIAL_BATCHES DROP COLUMN ID; +ALTER TABLE SAMPLE_MATERIAL_BATCHES ADD CONSTRAINT SAMB_PK PRIMARY KEY(SAMP_ID,MABA_ID); + -- Remove ID and REGISTRATION_TIMESTAMP column from DATA_SET_RELATIONSHIPS table DROP SEQUENCE DATA_SET_RELATIONSHIP_ID_SEQ; ALTER TABLE DATA_SET_RELATIONSHIPS DROP CONSTRAINT DSRE_PK; @@ -11,3 +18,11 @@ ALTER TABLE DATA_SET_RELATIONSHIPS DROP CONSTRAINT DSRE_BK_UK; ALTER TABLE DATA_SET_RELATIONSHIPS DROP COLUMN ID; ALTER TABLE DATA_SET_RELATIONSHIPS DROP COLUMN REGISTRATION_TIMESTAMP; ALTER TABLE DATA_SET_RELATIONSHIPS ADD CONSTRAINT DSRE_PK PRIMARY KEY(DATA_ID_PARENT,DATA_ID_CHILD); + +-- Rename: +-- OBSERVABLE_TYPES -> DATA_SET_TYPES +-- OBSERVABLE_TYPE_ID_SEQ -> DATA_SET_TYPE_ID_SEQ +-- DATA.OBTY_ID -> DATA.DSTY_ID +ALTER TABLE OBSERVABLE_TYPES RENAME TO DATA_SET_TYPES; +ALTER TABLE OBSERVABLE_TYPE_ID_SEQ RENAME TO DATA_SET_TYPE_ID_SEQ; +ALTER TABLE DATA RENAME COLUMN OBTY_ID TO DSTY_ID; -- GitLab