diff --git a/data/storage/mysql/create_tariffplan_tables.sql b/data/storage/mysql/create_tariffplan_tables.sql index 042fc24d9..5aa70cac2 100644 --- a/data/storage/mysql/create_tariffplan_tables.sql +++ b/data/storage/mysql/create_tariffplan_tables.sql @@ -491,8 +491,8 @@ CREATE TABLE tp_filters ( -- Table structure for table `tp_lcr` -- -DROP TABLE IF EXISTS tp_lcrs; -CREATE TABLE tp_lcrs ( +DROP TABLE IF EXISTS tp_lcr; +CREATE TABLE tp_lcr ( `pk` int(11) NOT NULL AUTO_INCREMENT, `tpid` varchar(64) NOT NULL, `tenant` varchar(64) NOT NULL, diff --git a/data/storage/postgres/create_tariffplan_tables.sql b/data/storage/postgres/create_tariffplan_tables.sql index 2a99637ae..efcd3a7fe 100644 --- a/data/storage/postgres/create_tariffplan_tables.sql +++ b/data/storage/postgres/create_tariffplan_tables.sql @@ -481,11 +481,11 @@ CREATE TABLE tp_filters ( CREATE INDEX tp_filters_unique ON tp_filters ("tpid","tenant", "id", "filter_type", "filter_field_name"); -- - -- Table structure for table `tp_resources` + -- Table structure for table `tp_lcr` -- - DROP TABLE IF EXISTS tp_lcrs; - CREATE TABLE tp_lcrs ( + DROP TABLE IF EXISTS tp_lcr; + CREATE TABLE tp_lcr ( "pk" SERIAL PRIMARY KEY, "tpid" varchar(64) NOT NULL, "tenant"varchar(64) NOT NULL, @@ -500,8 +500,8 @@ CREATE TABLE tp_filters ( "weight" decimal(8,2) NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE ); - CREATE INDEX tp_lcrs_idx ON tp_lcrs (tpid); - CREATE INDEX tp_lcrs_unique ON tp_lcrs ("tpid", "tenant", "id", "filter_ids"); + CREATE INDEX tp_lcr_idx ON tp_lcr (tpid); + CREATE INDEX tp_lcr_unique ON tp_lcr ("tpid", "tenant", "id", "filter_ids"); -- -- Table structure for table `versions` diff --git a/utils/consts.go b/utils/consts.go index 9b37b4311..c08a0b573 100755 --- a/utils/consts.go +++ b/utils/consts.go @@ -113,7 +113,7 @@ const ( TBLTPStats = "tp_stats" TBLTPThresholds = "tp_thresholds" TBLTPFilters = "tp_filters" - TBLTPLcr = "tp_lcrs" + TBLTPLcr = "tp_lcr" TBLSMCosts = "sm_costs" TBLCDRs = "cdrs" TBLVersions = "versions"