mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Add Charger in migrator and add API for TPCharger
This commit is contained in:
committed by
Dan Christian Bogos
parent
38c087d626
commit
5ddbfbfc51
@@ -525,7 +525,6 @@ CREATE TABLE tp_suppliers (
|
||||
-- Table structure for table `tp_attributes`
|
||||
--
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS tp_attributes;
|
||||
CREATE TABLE tp_attributes (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
@@ -548,9 +547,29 @@ CREATE TABLE tp_attributes (
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for table `versions`
|
||||
-- Table structure for table `tp_chargers`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS tp_chargers;
|
||||
CREATE TABLE tp_chargers (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`tpid` varchar(64) NOT NULL,
|
||||
`tenant` varchar(64) NOT NULL,
|
||||
`id` varchar(64) NOT NULL,
|
||||
`filter_ids` varchar(64) NOT NULL,
|
||||
`activation_interval` varchar(64) NOT NULL,
|
||||
`run_id` varchar(64) NOT NULL,
|
||||
`attribute_ids` varchar(64) NOT NULL,
|
||||
`created_at` TIMESTAMP,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `tpid` (`tpid`),
|
||||
UNIQUE KEY `unique_tp_chargers` (`tpid`,`tenant`,
|
||||
`id`,`filter_ids`,`run_id`,`attribute_ids`)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for table `versions`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS versions;
|
||||
CREATE TABLE versions (
|
||||
|
||||
@@ -536,6 +536,26 @@ CREATE INDEX tp_suppliers_unique ON tp_suppliers ("tpid", "tenant", "id",
|
||||
CREATE INDEX tp_attributes_unique ON tp_attributes ("tpid", "tenant", "id",
|
||||
"filter_ids","field_name","initial","substitute");
|
||||
|
||||
--
|
||||
-- Table structure for table `tp_chargers`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS tp_chargers;
|
||||
CREATE TABLE tp_chargers (
|
||||
"pk" SERIAL PRIMARY KEY,
|
||||
"tpid" varchar(64) NOT NULL,
|
||||
"tenant"varchar(64) NOT NULL,
|
||||
"id" varchar(64) NOT NULL,
|
||||
"filter_ids" varchar(64) NOT NULL,
|
||||
"activation_interval" varchar(64) NOT NULL,
|
||||
"run_id" varchar(64) NOT NULL,
|
||||
"attribute_ids" varchar(64) NOT NULL,
|
||||
"weight" decimal(8,2) NOT NULL,
|
||||
"created_at" TIMESTAMP WITH TIME ZONE
|
||||
);
|
||||
CREATE INDEX tp_chargers_ids ON tp_chargers (tpid);
|
||||
CREATE INDEX tp_chargers_unique ON tp_chargers ("tpid", "tenant", "id",
|
||||
"filter_ids","run_id","attribute_ids");
|
||||
|
||||
--
|
||||
-- Table structure for table `versions`
|
||||
|
||||
Reference in New Issue
Block a user