From 9f328f13fef898dbbdcde610e464523b7d3347c7 Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Mon, 5 Aug 2019 16:15:12 +0200 Subject: [PATCH] TT#62216 TT#62907 add id's to cdr_period_costs table Change-Id: If5e04c64b8b5def0f3e9858f0db2939acc384ef5 --- db_scripts/diff/15551.up | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/db_scripts/diff/15551.up b/db_scripts/diff/15551.up index d8b150a0..0fe2750b 100644 --- a/db_scripts/diff/15551.up +++ b/db_scripts/diff/15551.up @@ -1,7 +1,7 @@ use accounting; create table cdr_period_costs ( - + id int(10) unsigned not null auto_increment, contract_id int(11) unsigned not null, period enum('month','day') not null, period_date date not null, @@ -14,11 +14,16 @@ create table cdr_period_costs ( notify_status enum('new','notified') not null default 'new', notified_at datetime default null, first_cdr_start_time decimal(13,3) not null, + first_cdr_id int(10) unsigned, last_cdr_start_time decimal(13,3) not null, + last_cdr_id int(10) unsigned, - primary key (contract_id, period, period_date, direction), + primary key (id), + unique key (contract_id, period, period_date, direction), key cdrperiodcosts_pdfls (period, period_date, direction, fraud_limit_exceeded, notify_status), - key cdrperiodcosts_fstime (first_cdr_start_time) + key cdrperiodcosts_fstime (first_cdr_start_time), + key cdrperiodcosts_fcid (first_cdr_id), + key cdrperiodcosts_lcid (last_cdr_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;