From fc8138bcfadf4b6463e5513fe6044c9128fea008 Mon Sep 17 00:00:00 2001 From: kishan Date: Mon, 20 Dec 2010 23:40:13 +0530 Subject: [PATCH] bug 7504: Added new usage event table --- setup/db/create-schema.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql index 25c52b499d1..63caeb79eef 100755 --- a/setup/db/create-schema.sql +++ b/setup/db/create-schema.sql @@ -91,6 +91,7 @@ DROP TABLE IF EXISTS `cloud`.`load_balancing_ip_map`; DROP TABLE IF EXISTS `cloud`.`load_balancing_rules`; DROP TABLE IF EXISTS `cloud`.`port_forwarding_rules`; DROP TABLE IF EXISTS `cloud`.`firewall_rules`; +DROP TABLE IF EXISTS `cloud`.`usage_event`; CREATE TABLE `cloud`.`op_it_work` ( `id` char(40) COMMENT 'id', @@ -1252,4 +1253,19 @@ CREATE TABLE `cloud`.`instance_group_vm_map` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `cloud`.`usage_event` ( + `id` bigint unsigned NOT NULL auto_increment, + `type` varchar(32) NOT NULL, + `account_id` bigint unsigned NOT NULL, + `domain_id` bigint unsigned NOT NULL, + `created` datetime NOT NULL, + `zone_id` bigint unsigned NOT NULL, + `resource_id` bigint unsigned, + `resource_name` varchar(255), + `offering_id` bigint unsigned, + `template_id` bigint unsigned, + `size` bigint unsigned, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + SET foreign_key_checks = 1;