You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2017/04/03 16:49:53 UTC

[20/50] airavata git commit: adding SQL delta scripts for 0.16-0.17 release migration

adding SQL delta scripts for 0.16-0.17 release migration


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/eb7cbc5c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/eb7cbc5c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/eb7cbc5c

Branch: refs/heads/master
Commit: eb7cbc5c0786f4bd5a235c6a91d227b2b637ce47
Parents: 58c3d52
Author: Anuj Bhandar <bh...@gmail.com>
Authored: Mon Dec 26 14:22:56 2016 -0500
Committer: Anuj Bhandar <bh...@gmail.com>
Committed: Fri Mar 17 17:48:51 2017 -0400

----------------------------------------------------------------------
 .../DeltaScripts/appCatalog_schema_delta.sql    | 63 ++++++++++++++++++++
 .../credentialStore_schema_delta.sql            | 17 ++++++
 .../DeltaScripts/expCatalog_schema_delta.sql    | 32 ++++++++++
 .../replicaCatalog_schema_delta.sql             | 12 ++++
 .../DeltaScripts/workFlow_schema_delta.sql      | 11 ++++
 .../0.16-0.17/migration-notes.md                | 10 ++++
 6 files changed, 145 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/eb7cbc5c/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/appCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/appCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/appCatalog_schema_delta.sql
new file mode 100644
index 0000000..65f0cdd
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/appCatalog_schema_delta.sql
@@ -0,0 +1,63 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+the Apache License, Version 2.0 (the� "License"); you may not use this file except in compliance with the License. You may
+obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+the License. */
+
+# Will migrate 0.16 DataBase schema to 0.17 Database Schema
+
+CREATE TABLE `CLOUD_JOB_SUBMISSION` (
+  `JOB_SUBMISSION_INTERFACE_ID` varchar(255) NOT NULL,
+  `EXECUTABLE_TYPE` varchar(255) DEFAULT NULL,
+  `NODE_ID` varchar(255) DEFAULT NULL,
+  `PROVIDER_NAME` varchar(255) DEFAULT NULL,
+  `SECURITY_PROTOCOL` varchar(255) DEFAULT NULL,
+  `USER_ACCOUNT_NAME` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`JOB_SUBMISSION_INTERFACE_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE `USER_COMPUTE_RESOURCE_PREFERENCE` (
+  `RESOURCE_ID` varchar(255) NOT NULL,
+  `USER_ID` varchar(255) NOT NULL,
+  `PREFERED_BATCH_QUEUE` varchar(255) DEFAULT NULL,
+  `RESOURCE_CS_TOKEN` varchar(255) DEFAULT NULL,
+  `GATEWAY_ID` varchar(255) DEFAULT NULL,
+  `LOGIN_USERNAME` varchar(255) DEFAULT NULL,
+  `ALLOCATION_PROJECT_NUMBER` varchar(255) DEFAULT NULL,
+  `QUALITY_OF_SERVICE` varchar(255) DEFAULT NULL,
+  `RESERVATION` varchar(255) DEFAULT NULL,
+  `RESERVATION_END_TIME` datetime DEFAULT NULL,
+  `RESERVATION_START_TIME` datetime DEFAULT NULL,
+  `SCRATCH_LOCATION` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`RESOURCE_ID`,`USER_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE `USER_RESOURCE_PROFILE` (
+  `USER_ID` varchar(255) NOT NULL,
+  `CREATION_TIME` datetime DEFAULT NULL,
+  `CS_TOKEN` varchar(255) DEFAULT NULL,
+  `GATEWAY_ID` varchar(255) DEFAULT NULL,
+  `IDENTITY_SERVER_PWD_CRED_TOKEN` varchar(255) DEFAULT NULL,
+  `IDENTITY_SERVER_TENANT` varchar(255) DEFAULT NULL,
+  `UPDATE_TIME` datetime DEFAULT NULL,
+  PRIMARY KEY (`USER_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE `USER_STORAGE_PREFERENCE` (
+  `STORAGE_RESOURCE_ID` varchar(255) NOT NULL,
+  `USER_ID` varchar(255) NOT NULL,
+  `RESOURCE_CS_TOKEN` varchar(255) DEFAULT NULL,
+  `FS_ROOT_LOCATION` varchar(255) DEFAULT NULL,
+  `GATEWAY_ID` varchar(255) DEFAULT NULL,
+  `LOGIN_USERNAME` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`STORAGE_RESOURCE_ID`,`USER_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+ALTER TABLE `APPLICATION_DEPLOYMENT` ADD `DEFAULT_CPU_COUNT` int(11) DEFAULT NULL;
+ALTER TABLE `APPLICATION_DEPLOYMENT` ADD `DEFAULT_NODE_COUNT` int(11) DEFAULT NULL;
+ALTER TABLE `APPLICATION_DEPLOYMENT` ADD `DEFAULT_QUEUE_NAME` varchar(255) DEFAULT NULL;
+ALTER TABLE `APPLICATION_DEPLOYMENT` ADD `EDITABLE_BY_USER` bit(1) DEFAULT NULL;
+ALTER TABLE `BATCH_QUEUE` ADD `CPU_PER_NODE` int(11) DEFAULT NULL;
+ALTER TABLE `BATCH_QUEUE` ADD `DEFAULT_CPU_COUNT` int(11) DEFAULT NULL;
+ALTER TABLE `BATCH_QUEUE` ADD `DEFAULT_NODE_COUNT` int(11) DEFAULT NULL;
+ALTER TABLE `BATCH_QUEUE` ADD `IS_DEFAULT_QUEUE` bit(1) DEFAULT NULL;
+ALTER TABLE `LOCAL_SUBMISSION` ADD `SECURITY_PROTOCOL` varchar(255) DEFAULT NULL;
+ALTER TABLE `GATEWAY_CLIENT_CREDENTIAL` CHANGE `CLIENT_KEY` `CLIENT_KEY` varchar(255) NOT NULL;

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb7cbc5c/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/credentialStore_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/credentialStore_schema_delta.sql b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/credentialStore_schema_delta.sql
new file mode 100644
index 0000000..3a2c1b1
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/credentialStore_schema_delta.sql
@@ -0,0 +1,17 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+the Apache License, Version 2.0 (the� "License"); you may not use this file except in compliance with the License. You may
+obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+the License. */
+
+# Will migrate 0.16 DataBase schema to 0.17 Database Schema
+
+CREATE TABLE `CONFIGURATION` (
+  `CONFIG_KEY` varchar(255) NOT NULL DEFAULT '',
+  `CONFIG_VAL` varchar(255) NOT NULL DEFAULT '',
+  PRIMARY KEY (`CONFIG_KEY`,`CONFIG_VAL`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+ALTER TABLE `CREDENTIALS` ADD `DESCRIPTION` varchar(512) DEFAULT NULL;
+ALTER TABLE `CREDENTIALS` ADD `CREDENTIAL_OWNER_TYPE` varchar(10) NOT NULL DEFAULT 'GATEWAY';

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb7cbc5c/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/expCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/expCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/expCatalog_schema_delta.sql
new file mode 100644
index 0000000..38bf61c
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/expCatalog_schema_delta.sql
@@ -0,0 +1,32 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+the Apache License, Version 2.0 (the� "License"); you may not use this file except in compliance with the License. You may
+obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+the License. */
+
+# Will migrate 0.16 DataBase schema to 0.17 Database Schema
+
+CREATE TABLE `QUEUE_STATUS` (
+  `HOST_NAME` varchar(255) NOT NULL,
+  `QUEUE_NAME` varchar(255) NOT NULL,
+  `CREATED_TIME` bigint(20) NOT NULL,
+  `QUEUE_UP` bit(1) DEFAULT NULL,
+  `QUEUED_JOBS` int(11) DEFAULT NULL,
+  `RUNNING_JOBS` int(11) DEFAULT NULL,
+  PRIMARY KEY (`HOST_NAME`,`QUEUE_NAME`,`CREATED_TIME`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+ALTER TABLE `GATEWAY` ADD `DECLINED_REASON` varchar(255) DEFAULT NULL;
+ALTER TABLE `GATEWAY` ADD `OAUTH_CLIENT_SECRET` varchar(255) DEFAULT NULL;
+ALTER TABLE `GATEWAY` ADD `OAUTH_CLIENT_ID` varchar(255) DEFAULT NULL;
+ALTER TABLE `GATEWAY` ADD `REQUEST_CREATION_TIME` datetime DEFAULT CURRENT_TIMESTAMP;
+ALTER TABLE `GATEWAY` ADD `REQUESTER_USERNAME` varchar(255) DEFAULT NULL;
+ALTER TABLE `GATEWAY` ADD `GATEWAY_DOMAIN` varchar(255) DEFAULT NULL;
+ALTER TABLE `PROCESS` ADD `USE_USER_CR_PREF` bit(1) DEFAULT NULL;
+ALTER TABLE `USER_CONFIGURATION_DATA` ADD `IS_USE_USER_CR_PREF` bit(1) DEFAULT NULL;
+ALTER TABLE `EXPERIMENT_STATUS` CHANGE `TIME_OF_STATE_CHANGE` `TIME_OF_STATE_CHANGE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE `JOB_STATUS` CHANGE `TIME_OF_STATE_CHANGE` `TIME_OF_STATE_CHANGE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE `NOTIFICATION` CHANGE `NOTIFICATION_MESSAGE` `NOTIFICATION_MESSAGE` varchar(4096) NOT NULL;
+ALTER TABLE `USERS` CHANGE `AIRAVATA_INTERNAL_USER_ID` `AIRAVATA_INTERNAL_USER_ID` varchar(255) NOT NULL;
+ALTER TABLE `USERS` ADD UNIQUE KEY `AIRAVATA_INTERNAL_USER_ID` (`AIRAVATA_INTERNAL_USER_ID`);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb7cbc5c/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/replicaCatalog_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/replicaCatalog_schema_delta.sql b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/replicaCatalog_schema_delta.sql
new file mode 100644
index 0000000..c00e653
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/replicaCatalog_schema_delta.sql
@@ -0,0 +1,12 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+the Apache License, Version 2.0 (the� "License"); you may not use this file except in compliance with the License. You may
+obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+the License. */
+
+# Will migrate 0.16 DataBase schema to 0.17 Database Schema
+
+ALTER TABLE `DATA_PRODUCT` ADD KEY `PARENT_PRODUCT_URI` (`PARENT_PRODUCT_URI`);
+ALTER TABLE `DATA_PRODUCT` ADD CONSTRAINT `DATA_PRODUCT_ibfk_1` FOREIGN KEY (`PARENT_PRODUCT_URI`) REFERENCES `DATA_PRODUCT` (`PRODUCT_URI`) ON DELETE CASCADE;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb7cbc5c/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/workFlow_schema_delta.sql
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/workFlow_schema_delta.sql b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/workFlow_schema_delta.sql
new file mode 100644
index 0000000..9b30353
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.16-0.17/DeltaScripts/workFlow_schema_delta.sql
@@ -0,0 +1,11 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under
+the Apache License, Version 2.0 (the� "License"); you may not use this file except in compliance with the License. You may
+obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
+in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
+ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under
+the License. */
+
+# Will migrate 0.16 DataBase schema to 0.17 Database Schema
+
+# No Migration needed, schema's are identical

http://git-wip-us.apache.org/repos/asf/airavata/blob/eb7cbc5c/modules/registry/release-migration-scripts/0.16-0.17/migration-notes.md
----------------------------------------------------------------------
diff --git a/modules/registry/release-migration-scripts/0.16-0.17/migration-notes.md b/modules/registry/release-migration-scripts/0.16-0.17/migration-notes.md
new file mode 100644
index 0000000..13d624b
--- /dev/null
+++ b/modules/registry/release-migration-scripts/0.16-0.17/migration-notes.md
@@ -0,0 +1,10 @@
+## 0.16 - 0.17 Migration Notes
+ 
+ ### Known Issues:
+  
+  * Experiment catalog - _NOTIFICATION_ and _USER_ table's column ordering differs, apart from this difference all other constraints are met 
+ 
+ ### Migration Steps:
+ 
+  * Execute the SQL scripts present in DeltaScripts folder on top of Airavata 0.16 Release Database
+  * dev_sharingcatalog and dev_grouper database schema's are not present in Airavata 0.16 Release, hence whole database has to be migrated, therefore not delta scripts are generated.
\ No newline at end of file