From 07412baa3500a8ff4086adb0edf03c9bd2a69310 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 3 Mar 2016 10:52:10 +1300 Subject: Start db changelogs from scratch --- database/db.changelog-normalize.xml | 114 ------------------------------------ 1 file changed, 114 deletions(-) delete mode 100644 database/db.changelog-normalize.xml (limited to 'database/db.changelog-normalize.xml') diff --git a/database/db.changelog-normalize.xml b/database/db.changelog-normalize.xml deleted file mode 100644 index 7621846ca..000000000 --- a/database/db.changelog-normalize.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE ALIAS IF NOT EXISTS EXECUTE AS $$ void executeSql(Connection conn, String sql) throws SQLException { try { conn.createStatement().executeUpdate(sql); } catch (Exception e) {} } $$; - - CALL EXECUTE('ALTER TABLE POSITION DROP CONSTRAINT ' || (SELECT DISTINCT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = 'POSITION' AND COLUMN_LIST = 'DEVICEID')); - CALL EXECUTE('ALTER TABLE DEVICE DROP CONSTRAINT ' || (SELECT DISTINCT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = 'DEVICE' AND COLUMN_LIST = 'POSITIONID')); - CALL EXECUTE('ALTER TABLE DEVICE DROP CONSTRAINT ' || (SELECT DISTINCT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = 'DEVICE' AND COLUMN_LIST = 'DATAID')); - CALL EXECUTE('ALTER TABLE USER_DEVICE DROP CONSTRAINT ' || (SELECT DISTINCT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = 'USER_DEVICE' AND COLUMN_LIST = 'USERID')); - CALL EXECUTE('ALTER TABLE USER_DEVICE DROP CONSTRAINT ' || (SELECT DISTINCT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = 'USER_DEVICE' AND COLUMN_LIST = 'DEVICEID')); - CALL EXECUTE('ALTER TABLE DATA DROP CONSTRAINT ' || (SELECT DISTINCT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.CONSTRAINTS WHERE CONSTRAINT_TYPE = 'REFERENTIAL' AND TABLE_NAME = 'DATA' AND COLUMN_LIST = 'DEVICEID')); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3