Updated Branches:
  refs/heads/4.1 e4b83993a -> 759b30134

CLOUDSTACK-1347: Don't enforce not null rule on queue_proc_time of 
sync_item_queue

In c63dbb88042d7eabea2664c2b608c51792fc9f18 I removed the rule from 
create-schema:
-  `queue_proc_time` datetime COMMENT 'when processing started for the item',

But, upgrade path schema-40to410.sql had a different rule which caused the bug:
+ALTER TABLE `cloud`.`sync_queue_item` ADD `queue_proc_time` DATETIME NOT NULL
COMMENT 'when processing started for the item' AFTER `queue_proc_number`;

In this fix we just revert to whatever rule was defined in create-schema as the
developer may have forgetten to fix same rule in create-schema and upgrade path.
This commit can be reverted or the code be fixed if we want that queue_proc_time
cannot be null.

Signed-off-by: Rohit Yadav <[email protected]>
(cherry picked from commit 4e72d84194cb79f5f067fbe4b2c874d36d2ae0e7)

Signed-off-by: Rohit Yadav <[email protected]>


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

Branch: refs/heads/4.1
Commit: 759b30134151b8695e88289a5a56bb3e991f9a5c
Parents: e4b8399
Author: Rohit Yadav <[email protected]>
Authored: Thu Feb 21 14:56:43 2013 +0530
Committer: Rohit Yadav <[email protected]>
Committed: Thu Feb 21 15:02:13 2013 +0530

----------------------------------------------------------------------
 setup/db/db/schema-40to410.sql |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/759b3013/setup/db/db/schema-40to410.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-40to410.sql b/setup/db/db/schema-40to410.sql
index 9a59318..47b7cbe 100644
--- a/setup/db/db/schema-40to410.sql
+++ b/setup/db/db/schema-40to410.sql
@@ -200,7 +200,7 @@ ALTER TABLE `cloud`.`sync_queue` DROP COLUMN 
`queue_proc_time`;
 
 ALTER TABLE `cloud`.`sync_queue` DROP COLUMN `queue_proc_msid`;
 
-ALTER TABLE `cloud`.`sync_queue_item` ADD `queue_proc_time` DATETIME NOT NULL 
COMMENT 'when processing started for the item' AFTER `queue_proc_number`;
+ALTER TABLE `cloud`.`sync_queue_item` ADD `queue_proc_time` DATETIME COMMENT 
'when processing started for the item' AFTER `queue_proc_number`;
 
 ALTER TABLE `cloud`.`sync_queue_item` ADD INDEX 
`i_sync_queue__queue_proc_time`(`queue_proc_time`);
 

Reply via email to