[sr-dev] git:master:b847ff22: kamctl: upgrade schema for acc
Victor Seva
linuxmaniac at torreviejawireless.org
Tue Apr 21 16:40:28 CEST 2015
Module: kamailio
Branch: master
Commit: b847ff224ac8e738e07f9631cb7ba27091d9b22b
URL: https://github.com/kamailio/kamailio/commit/b847ff224ac8e738e07f9631cb7ba27091d9b22b
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2015-04-21T16:18:39+02:00
kamctl: upgrade schema for acc
---
Modified: utils/kamctl/db_berkeley/kamailio/acc_cdrs
Modified: utils/kamctl/db_sqlite/acc-create.sql
Modified: utils/kamctl/mysql/acc-create.sql
Modified: utils/kamctl/oracle/acc-create.sql
Modified: utils/kamctl/postgres/acc-create.sql
---
Diff: https://github.com/kamailio/kamailio/commit/b847ff224ac8e738e07f9631cb7ba27091d9b22b.diff
Patch: https://github.com/kamailio/kamailio/commit/b847ff224ac8e738e07f9631cb7ba27091d9b22b.patch
---
diff --git a/utils/kamctl/db_berkeley/kamailio/acc_cdrs b/utils/kamctl/db_berkeley/kamailio/acc_cdrs
index 8eb3cbb..57ab533 100644
--- a/utils/kamctl/db_berkeley/kamailio/acc_cdrs
+++ b/utils/kamctl/db_berkeley/kamailio/acc_cdrs
@@ -7,4 +7,4 @@ METADATA_READONLY
METADATA_LOGFLAGS
0
METADATA_DEFAULTS
-NIL|''|''|''
+NIL|'2000-01-01 00:00:00'|'2000-01-01 00:00:00'|0
diff --git a/utils/kamctl/db_sqlite/acc-create.sql b/utils/kamctl/db_sqlite/acc-create.sql
index d27d307..60b4193 100644
--- a/utils/kamctl/db_sqlite/acc-create.sql
+++ b/utils/kamctl/db_sqlite/acc-create.sql
@@ -15,9 +15,9 @@ CREATE INDEX acc_callid_idx ON acc (callid);
INSERT INTO version (table_name, table_version) values ('acc_cdrs','2');
CREATE TABLE acc_cdrs (
id INTEGER PRIMARY KEY NOT NULL,
- start_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '' NOT NULL,
- end_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '' NOT NULL,
- duration REAL DEFAULT '' NOT NULL
+ start_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL,
+ end_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL,
+ duration REAL DEFAULT 0 NOT NULL
);
CREATE INDEX acc_cdrs_start_time_idx ON acc_cdrs (start_time);
diff --git a/utils/kamctl/mysql/acc-create.sql b/utils/kamctl/mysql/acc-create.sql
index c088ca4..0d02811 100644
--- a/utils/kamctl/mysql/acc-create.sql
+++ b/utils/kamctl/mysql/acc-create.sql
@@ -15,9 +15,9 @@ CREATE INDEX callid_idx ON acc (callid);
INSERT INTO version (table_name, table_version) values ('acc_cdrs','2');
CREATE TABLE acc_cdrs (
id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
- start_time DATETIME DEFAULT '' NOT NULL,
- end_time DATETIME DEFAULT '' NOT NULL,
- duration FLOAT(10,3) DEFAULT '' NOT NULL
+ start_time DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL,
+ end_time DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL,
+ duration FLOAT(10,3) DEFAULT 0 NOT NULL
);
CREATE INDEX start_time_idx ON acc_cdrs (start_time);
diff --git a/utils/kamctl/oracle/acc-create.sql b/utils/kamctl/oracle/acc-create.sql
index b84a97b..2a71e85 100644
--- a/utils/kamctl/oracle/acc-create.sql
+++ b/utils/kamctl/oracle/acc-create.sql
@@ -23,9 +23,9 @@ CREATE INDEX acc_callid_idx ON acc (callid);
INSERT INTO version (table_name, table_version) values ('acc_cdrs','2');
CREATE TABLE acc_cdrs (
id NUMBER(10) PRIMARY KEY,
- start_time DATE DEFAULT '',
- end_time DATE DEFAULT '',
- duration NUMBER(10,3) DEFAULT ''
+ start_time DATE DEFAULT '2000-01-01 00:00:00',
+ end_time DATE DEFAULT '2000-01-01 00:00:00',
+ duration NUMBER(10,3) DEFAULT 0 NOT NULL
);
CREATE OR REPLACE TRIGGER acc_cdrs_tr
diff --git a/utils/kamctl/postgres/acc-create.sql b/utils/kamctl/postgres/acc-create.sql
index 8ae4336..713514f 100644
--- a/utils/kamctl/postgres/acc-create.sql
+++ b/utils/kamctl/postgres/acc-create.sql
@@ -15,9 +15,9 @@ CREATE INDEX acc_callid_idx ON acc (callid);
INSERT INTO version (table_name, table_version) values ('acc_cdrs','2');
CREATE TABLE acc_cdrs (
id SERIAL PRIMARY KEY NOT NULL,
- start_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '' NOT NULL,
- end_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '' NOT NULL,
- duration REAL DEFAULT '' NOT NULL
+ start_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL,
+ end_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL,
+ duration REAL DEFAULT 0 NOT NULL
);
CREATE INDEX acc_cdrs_start_time_idx ON acc_cdrs (start_time);
More information about the sr-dev
mailing list