This is an automated email from the ASF dual-hosted git repository.
shwstppr pushed a commit to branch 4.17
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.17 by this push:
new a45a4a5218 upgrade a backported patch (#6728)
a45a4a5218 is described below
commit a45a4a5218d6eb6d2b411cba00a59068200f2868
Author: dahn <[email protected]>
AuthorDate: Tue Sep 13 07:03:36 2022 +0200
upgrade a backported patch (#6728)
This PR tries to fix a problem with a privately backported feature. The
columns added for the feature are not added idem potent so people can not
backport them. I propose that all DB alteration from here on in will be done
with the IDEM_POTENT_...() set of stored procedures that we have to prevent
these kind of issues for users.
---
engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
a/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
b/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
index 6885e49922..f51f88aef8 100644
--- a/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
+++ b/engine/schema/src/main/resources/META-INF/db/schema-41610to41700.sql
@@ -887,9 +887,8 @@ left join `cloud`.`mshost_status` on
((`cloud`.`mshost`.`uuid` = `cloud`.`mshost_status`.`ms_id`)));
-- Alter event table to add resource_id and resource_type
-ALTER TABLE `cloud`.`event`
- ADD COLUMN `resource_id` bigint unsigned COMMENT 'ID of the resource
associated with the event' AFTER `domain_id`,
- ADD COLUMN `resource_type` varchar(32) COMMENT 'Type of the resource
associated with the event' AFTER `resource_id`;
+CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.event','resource_id', 'bigint
unsigned COMMENT "ID of the resource associated with the event" AFTER
`domain_id`');
+CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.event','resource_type',
'VARCHAR(32) COMMENT "Type of the resource associated with the event" AFTER
`resource_id`');
DROP VIEW IF EXISTS `cloud`.`event_view`;
CREATE VIEW `cloud`.`event_view` AS