mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 09:08:45 +05:00
Unified storage SetCdr and SetRatedCdr into SetCDR, engine/storage_cdrs_it_test should automate testing for the supported StoredDb drivers
This commit is contained in:
13
data/conf/samples/storage/mysql/cgrates.json
Normal file
13
data/conf/samples/storage/mysql/cgrates.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
// CGRateS Configuration file used for testing mysql implementation
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_type": "mysql", // stor database type to use: <mysql|postgres>
|
||||
"db_host": "127.0.0.1", // the host to connect to
|
||||
"db_port": 3306, // the port to reach the stordb
|
||||
"db_name": "cgrates", // stor database name
|
||||
"db_user": "cgrates", // username to use when connecting to stordb
|
||||
"db_passwd": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
}
|
||||
13
data/conf/samples/storage/postgres/cgrates.json
Normal file
13
data/conf/samples/storage/postgres/cgrates.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
// CGRateS Configuration file used for testing mysql implementation
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_type": "postgres", // stor database type to use: <mysql|postgres>
|
||||
"db_host": "127.0.0.1", // the host to connect to
|
||||
"db_port": 5432, // the port to reach the stordb
|
||||
"db_name": "cgrates", // stor database name
|
||||
"db_user": "cgrates", // username to use when connecting to stordb
|
||||
"db_passwd": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
--
|
||||
-- Table structure for table `cdrs`
|
||||
--
|
||||
@@ -28,13 +27,11 @@ CREATE TABLE cdrs (
|
||||
extra_fields text NOT NULL,
|
||||
cost_source varchar(64) NOT NULL,
|
||||
cost DECIMAL(20,4) NOT NULL,
|
||||
timespans text,
|
||||
cost_details text,
|
||||
extra_info text,
|
||||
created_at TIMESTAMP,
|
||||
updated_at TIMESTAMP,
|
||||
deleted_at TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY cgrid (cgrid),
|
||||
KEY answer_time_idx (answer_time),
|
||||
KEY deleted_at_idx (deleted_at)
|
||||
UNIQUE KEY cdrrun (cgrid, run_id)
|
||||
);
|
||||
|
||||
@@ -24,15 +24,15 @@ CREATE TABLE cdrs (
|
||||
usage NUMERIC(30,9) NOT NULL,
|
||||
supplier VARCHAR(128) NOT NULL,
|
||||
disconnect_cause VARCHAR(64) NOT NULL,
|
||||
extra_fields jsonb NOT NULL,
|
||||
cost NUMERIC(20,4) DEFAULT NULL,
|
||||
timespans jsonb,
|
||||
extra_fields jsonb,
|
||||
cost_source VARCHAR(64) NOT NULL,
|
||||
cost NUMERIC(20,4) DEFAULT NULL,
|
||||
cost_details jsonb,
|
||||
extra_info text,
|
||||
created_at TIMESTAMP,
|
||||
updated_at TIMESTAMP,
|
||||
deleted_at TIMESTAMP,
|
||||
UNIQUE (cgrid)
|
||||
UNIQUE (cgrid, run_id)
|
||||
);
|
||||
;
|
||||
DROP INDEX IF EXISTS deleted_at_cp_idx;
|
||||
|
||||
Reference in New Issue
Block a user