From 57e53837029a96a78d905dc15cd6863386a94cdf Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 4 Dec 2012 14:12:32 +0000 Subject: [PATCH] Add new CDR rows in one go. CDR tables are potentially huge, so do the changes in on query. --- db_scripts/diff/11812.down | 7 ++++++- db_scripts/diff/11812.up | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/db_scripts/diff/11812.down b/db_scripts/diff/11812.down index 0537b6bd..1cd0e0a4 100644 --- a/db_scripts/diff/11812.down +++ b/db_scripts/diff/11812.down @@ -1,2 +1,7 @@ use accounting; -alter table cdr drop column source_ip; +alter table cdr + drop key estatus, + drop column source_ip, + drop column split, + drop column exported_at, + drop column export_status; diff --git a/db_scripts/diff/11812.up b/db_scripts/diff/11812.up index 3fa58d95..7009217f 100644 --- a/db_scripts/diff/11812.up +++ b/db_scripts/diff/11812.up @@ -1,2 +1,8 @@ use accounting; -alter table cdr add column source_ip varchar(64) not null after source_clir; +alter table cdr + add column source_ip varchar(64) not null after source_clir, + add column split tinyint(1) unsigned not null default 0 after is_fragmented, + add column exported_at datetime default null, + add column export_status enum('unexported', 'ok', 'failed') not null default 'unexported', + add key estatus(export_status); +