cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [30/50] [abbrv] git commit: updated refs/heads/disk-cache to 99d67cb
Date Mon, 02 Sep 2013 20:05:16 GMT
Bring over db changes for jobs


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b484666f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b484666f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b484666f

Branch: refs/heads/disk-cache
Commit: b484666f195cafb0c4c69b9d19007d8a63afcdba
Parents: 1fc8749
Author: Alex Huang <alex.huang@citrix.com>
Authored: Fri Aug 2 11:07:36 2013 -0700
Committer: Alex Huang <alex.huang@citrix.com>
Committed: Fri Aug 2 11:07:57 2013 -0700

----------------------------------------------------------------------
 setup/db/db/schema-420to430.sql | 66 ++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b484666f/setup/db/db/schema-420to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-420to430.sql b/setup/db/db/schema-420to430.sql
index 3f7ef09..52b8391 100644
--- a/setup/db/db/schema-420to430.sql
+++ b/setup/db/db/schema-420to430.sql
@@ -21,3 +21,69 @@
 
 -- Disable foreign key checking
 SET foreign_key_checks = 0;
+
+ALTER TABLE `cloud`.`async_job` ADD COLUMN `related` CHAR(40) NOT NULL;
+ALTER TABLE `cloud`.`async_job` DROP COLUMN `session_key`;
+ALTER TABLE `cloud`.`async_job` DROP COLUMN `job_cmd_originator`;
+ALTER TABLE `cloud`.`async_job` DROP COLUMN `callback_type`;
+ALTER TABLE `cloud`.`async_job` DROP COLUMN `callback_address`;
+
+ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_type` VARCHAR(32);
+ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_dispatcher` VARCHAR(64);
+ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_executing_msid` bigint;
+ALTER TABLE `cloud`.`async_job` ADD COLUMN `job_pending_signals` int(10) NOT NULL DEFAULT
0;
+
+ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_state` VARCHAR(74) DEFAULT 'PowerUnknown';
+ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_state_update_time` DATETIME;
+ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_state_update_count` INT DEFAULT 0;
+ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `power_host` bigint unsigned;
+ALTER TABLE `cloud`.`vm_instance` ADD CONSTRAINT `fk_vm_instance__power_host` FOREIGN KEY
(`power_host`) REFERENCES `cloud`.`host`(`id`);
+
+CREATE TABLE `cloud`.`vm_work_job` (
+  `id` bigint unsigned UNIQUE NOT NULL,
+  `step` char(32) NOT NULL COMMENT 'state',
+  `vm_type` char(32) NOT NULL COMMENT 'type of vm',
+  `vm_instance_id` bigint unsigned NOT NULL COMMENT 'vm instance',
+  PRIMARY KEY (`id`),
+  CONSTRAINT `fk_vm_work_job__instance_id` FOREIGN KEY (`vm_instance_id`) REFERENCES `vm_instance`(`id`)
ON DELETE CASCADE,
+  INDEX `i_vm_work_job__vm`(`vm_type`, `vm_instance_id`),
+  INDEX `i_vm_work_job__step`(`step`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`async_job_journal` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `job_id` bigint unsigned NOT NULL,
+  `journal_type` varchar(32),
+  `journal_text` varchar(1024) COMMENT 'journal descriptive informaton',
+  `journal_obj` varchar(1024) COMMENT 'journal strutural information, JSON encoded object',
+  `created` datetime NOT NULL COMMENT 'date created',
+  PRIMARY KEY (`id`),
+  CONSTRAINT `fk_async_job_journal__job_id` FOREIGN KEY (`job_id`) REFERENCES `async_job`(`id`)
ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`async_job_join_map` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `job_id` bigint unsigned NOT NULL,
+  `join_job_id` bigint unsigned NOT NULL,
+  `join_status` int NOT NULL,
+  `join_result` varchar(1024),
+  `join_msid` bigint,
+  `complete_msid` bigint,
+  `sync_source_id` bigint COMMENT 'upper-level job sync source info before join',
+  `wakeup_handler` varchar(64),
+  `wakeup_dispatcher` varchar(64),
+  `wakeup_interval` bigint NOT NULL DEFAULT 3000 COMMENT 'wakeup interval in seconds',
+  `created` datetime NOT NULL,
+  `last_updated` datetime,
+  `next_wakeup` datetime,
+  `expiration` datetime,
+  PRIMARY KEY (`id`),
+  CONSTRAINT `fk_async_job_join_map__job_id` FOREIGN KEY (`job_id`) REFERENCES `async_job`(`id`)
ON DELETE CASCADE,
+  CONSTRAINT `fk_async_job_join_map__join_job_id` FOREIGN KEY (`join_job_id`) REFERENCES
`async_job`(`id`),
+  CONSTRAINT `fk_async_job_join_map__join` UNIQUE (`job_id`, `join_job_id`),
+  INDEX `i_async_job_join_map__join_job_id`(`join_job_id`),
+  INDEX `i_async_job_join_map__created`(`created`),
+  INDEX `i_async_job_join_map__last_updated`(`last_updated`),
+  INDEX `i_async_job_join_map__next_wakeup`(`next_wakeup`),
+  INDEX `i_async_job_join_map__expiration`(`expiration`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;


Mime
View raw message