Support for latest gorm

This commit is contained in:
DanB
2016-04-04 13:02:06 +02:00
parent cb80a24bac
commit a307dc3ce0
8 changed files with 27 additions and 37 deletions

View File

@@ -47,8 +47,8 @@
"sm_generic": {
"enabled": true,
"rater": "127.0.0.1:2013",
"cdrs": "127.0.0.1:2013",
"rater": "internal",
"cdrs": "internal",
},
"diameter_agent": {

View File

@@ -29,9 +29,9 @@ CREATE TABLE cdrs (
cost DECIMAL(20,4) NOT NULL,
cost_details text,
extra_info text,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
created_at TIMESTAMP NULL,
updated_at TIMESTAMP NULL,
deleted_at TIMESTAMP NULL,
PRIMARY KEY (id),
UNIQUE KEY cdrrun (cgrid, run_id, origin_id)
);
@@ -46,8 +46,8 @@ CREATE TABLE sm_costs (
cost_source varchar(64) NOT NULL,
`usage` DECIMAL(30,9) NOT NULL,
cost_details text,
created_at TIMESTAMP,
deleted_at TIMESTAMP,
created_at TIMESTAMP NULL,
deleted_at TIMESTAMP NULL,
PRIMARY KEY (`id`),
UNIQUE KEY costid (cgrid,run_id),
KEY origin_idx (origin_host, origin_id),

View File

@@ -30,8 +30,8 @@ CREATE TABLE cdrs (
cost_details jsonb,
extra_info text,
created_at TIMESTAMP,
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
updated_at TIMESTAMP NULL,
deleted_at TIMESTAMP NULL,
UNIQUE (cgrid, run_id, origin_id)
);
;
@@ -50,7 +50,7 @@ CREATE TABLE sm_costs (
usage NUMERIC(30,9) NOT NULL,
cost_details jsonb,
created_at TIMESTAMP,
deleted_at TIMESTAMP,
deleted_at TIMESTAMP NULL,
UNIQUE (cgrid, run_id)
);
DROP INDEX IF EXISTS cgrid_smcost_idx;