DaanHoogland commented on code in PR #7659:
URL: https://github.com/apache/cloudstack/pull/7659#discussion_r1236514444


##########
engine/schema/src/main/resources/META-INF/db/schema-41810to41900.sql:
##########
@@ -137,3 +137,18 @@ UPDATE `cloud`.`console_session` SET removed=now();
 ALTER TABLE `cloud`.`console_session` DROP `acquired`, ADD `acquired` datetime 
COMMENT 'When the session was acquired' AFTER `host_id`;
 -- create_public_parameter_on_roles. #6960
 ALTER TABLE `cloud`.`roles` ADD COLUMN `public_role` tinyint(1) NOT NULL 
DEFAULT '1' COMMENT 'Indicates whether the role will be visible to all users 
(public) or only to root admins (private). If this parameter is not specified 
during the creation of the role its value will be defaulted to true (public).';
+
+-- Create heuristic table for dynamic allocating resources to the secondary 
storage
+CREATE TABLE IF NOT EXISTS `cloud`.`heuristics` (
+    `id` bigint(20) unsigned NOT NULL auto_increment,
+    `uuid` varchar(255) UNIQUE NOT NULL,
+    `name` text NOT NULL,
+    `description` text DEFAULT NULL,
+    `zone_id` bigint(20) unsigned NOT NULL COMMENT 'ID of the zone to apply 
the heuristic, foreign key to `data_center` table',
+    `purpose` varchar(255) NOT NULL,
+    `heuristic_rule` text NOT NULL COMMENT 'JS script that defines to which 
secondary storage the resource will be allocated.',
+    `created` datetime NOT NULL,
+    `removed` datetime DEFAULT NULL,
+    PRIMARY KEY (`id`),
+    CONSTRAINT `fk_heuristics__zone_id` FOREIGN KEY(`zone_id`) REFERENCES 
`cloud`.`data_center`(`id`)
+);

Review Comment:
   needs an extra newline



-- 
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]

Reply via email to