shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1584139253
##########
engine/schema/src/main/resources/META-INF/db/schema-41900to42000.sql:
##########
@@ -79,3 +78,46 @@ CREATE TABLE IF NOT EXISTS
`cloud_usage`.`quota_email_configuration`(
PRIMARY KEY (`account_id`, `email_template_id`),
CONSTRAINT `FK_quota_email_configuration_account_id` FOREIGN KEY
(`account_id`) REFERENCES `cloud_usage`.`quota_account`(`account_id`),
CONSTRAINT `FK_quota_email_configuration_email_template_id` FOREIGN KEY
(`email_template_id`) REFERENCES `cloud_usage`.`quota_email_templates`(`id`));
+
+-- Webhooks feature
+DROP TABLE IF EXISTS `cloud`.`webhook`;
+CREATE TABLE `cloud`.`webhook` (
+ `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id of the webhook',
+ `uuid` varchar(255) COMMENT 'uuid of the webhook',
+ `name` varchar(255) NOT NULL COMMENT 'name of the webhook',
+ `description` varchar(4096) COMMENT 'description for the webhook',
+ `state` char(32) NOT NULL COMMENT 'state of the webhook - Enabled or
Disabled',
+ `domain_id` bigint unsigned NOT NULL COMMENT 'id of the owner domain of the
webhook',
+ `account_id` bigint unsigned NOT NULL COMMENT 'id of the owner account of
the webhook',
+ `payload_url` varchar(255) COMMENT 'payload URL for the webhook',
+ `secret_key` varchar(255) COMMENT 'secret key for the webhook',
+ `ssl_verification` boolean COMMENT 'for https payload url, if true then
strict ssl verification',
+ `scope` char(32) NOT NULL COMMENT 'scope for the webhook - Local, Domain,
Global',
+ `created` datetime COMMENT 'date the webhook was created',
+ `removed` datetime COMMENT 'date removed if not null',
+ `generated_removed` BIGINT(15) GENERATED ALWAYS AS (IF(removed IS NULL, 0,
TIMESTAMPDIFF(SECOND, from_unixtime(0), removed))),
Review Comment:
```suggestion
`generated_removed` BIGINT(15) GENERATED ALWAYS AS (IF(removed IS NULL, 0,
TIMESTAMPDIFF(SECOND, from_unixtime(0), removed))) PERSISTENT,
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]