vivekshresta commented on a change in pull request #255:
URL: https://github.com/apache/airavata/pull/255#discussion_r441915178
##########
File path:
modules/registry/release-migration-scripts/next/DeltaScripts/appCatalog_schema_delta.sql
##########
@@ -24,3 +24,18 @@ use app_catalog;
alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS
RESERVATION;
alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS
RESERVATION_START_TIME;
alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS
RESERVATION_END_TIME;
+
+-- AIRAVATA-3343: Add UserStorageQuota entry to StoragePreferences table
+SET @AddUserStorageQuota = (SELECT IF(
Review comment:
Thanks for reviewing my code. I agree that the query isn't very
readable, but sadly, as you've pointed out, unlike mariadb, mysql does not have
the 'IF NOT EXISTS' syntax.
Changing this query to a more readable MariaDB syntax throws an Error during
docker-compose. One thing I can do is, write the new query and comment it, and
once the migration is successful, I can remove the current complex query and
uncomment the new one. Or the other approach I can think of is, remove the
complex query and add a commented 'alter table STORAGE_PREFERENCE IF NOT
EXISTS' query which can be uncommented when the migration is successfully
merged. Please let me know if there's any better approach.
'But these release-migration-scripts we only run against MariaDB databases
where IF NOT EXISTS is supported.' - Do you mean to say in the future, these
migration-scripts will only be run against MariaDB?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]