Skip to content

Commit b9e0e91

Browse files
committed
db: use explicit USE statements to avoid SQL failures
create-schema-premium.sql may fail with certain MySQL/MariaDB version which require explicit database use. (cherry picked from commit 09e26c8) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 177c190 commit b9e0e91

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎setup/db/create-schema-premium.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
-- under the License.
1717

1818
SET foreign_key_checks = 0;
19+
USE `cloud_usage`;
1920
DROP TABLE IF EXISTS `cloud_usage`.`cloud_usage`;
2021
DROP TABLE IF EXISTS `cloud_usage`.`usage_vm_instance`;
2122
DROP TABLE IF EXISTS `cloud_usage`.`usage_ip_address`;
@@ -282,6 +283,8 @@ ALTER TABLE `cloud_usage`.`usage_security_group` ADD INDEX `i_usage_security_gro
282283
ALTER TABLE `cloud_usage`.`usage_security_group` ADD INDEX `i_usage_security_group__created`(`created`);
283284
ALTER TABLE `cloud_usage`.`usage_security_group` ADD INDEX `i_usage_security_group__deleted`(`deleted`);
284285

286+
USE `cloud`;
287+
285288
CREATE TABLE `cloud`.`netapp_volume` (
286289
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT COMMENT 'id',
287290
`ip_address` varchar(255) NOT NULL COMMENT 'ip address/fqdn of the volume',

0 commit comments

Comments
 (0)