diff --git a/db_scripts/diff/15357.down b/db_scripts/diff/15357.down new file mode 100644 index 00000000..f53e681f --- /dev/null +++ b/db_scripts/diff/15357.down @@ -0,0 +1,3 @@ +USE stats; + +DROP TABLE cdr_info; diff --git a/db_scripts/diff/15357.up b/db_scripts/diff/15357.up new file mode 100644 index 00000000..dd3d993b --- /dev/null +++ b/db_scripts/diff/15357.up @@ -0,0 +1,28 @@ +USE stats; + +CREATE TABLE cdr_info ( + id int(11) unsigned NOT NULL AUTO_INCREMENT, + + peer_in_total int(11) unsigned NOT NULL DEFAULT 0, + peer_in_rated int(11) unsigned NOT NULL DEFAULT 0, + peer_out_total int(11) unsigned NOT NULL DEFAULT 0, + peer_out_rated int(11) unsigned NOT NULL DEFAULT 0, + peer_cost decimal(14,6) DEFAULT 0, + + reseller_in_total int(11) unsigned NOT NULL DEFAULT 0, + reseller_in_rated int(11) unsigned NOT NULL DEFAULT 0, + reseller_out_total int(11) unsigned NOT NULL DEFAULT 0, + reseller_out_rated int(11) unsigned NOT NULL DEFAULT 0, + reseller_cost decimal(14,6) DEFAULT 0, + + customer_in_total int(11) unsigned NOT NULL DEFAULT 0, + customer_in_rated int(11) unsigned NOT NULL DEFAULT 0, + customer_out_total int(11) unsigned NOT NULL DEFAULT 0, + customer_out_rated int(11) unsigned NOT NULL DEFAULT 0, + customer_cost decimal(14,6) DEFAULT 0, + + period datetime NOT NULL, + last_rated_id int(11) unsigned DEFAULT NULL, + PRIMARY KEY (id), + UNIQUE KEY cdr_info_period_idx (period) +) ENGINE=InnoDB DEFAULT CHARSET=utf8;