mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Adding cdrs tables
This commit is contained in:
31
data/storage/mysql/create_cdrs_tables.sql
Normal file
31
data/storage/mysql/create_cdrs_tables.sql
Normal file
@@ -0,0 +1,31 @@
|
||||
--
|
||||
-- Table structure for table `cdrs_primary`
|
||||
--
|
||||
DROP TABLE IF EXISTS `cdrs_primary`;
|
||||
CREATE TABLE `cdrs_primary` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`cgrid` char(40) NOT NULL,
|
||||
`accid` varchar(64) NOT NULL,
|
||||
`direction` enum('0','1','2') NOT NULL DEFAULT '1',
|
||||
`tenant` varchar(64) NOT NULL,
|
||||
`tor` varchar(8) NOT NULL,
|
||||
`account` varchar(64) NOT NULL,
|
||||
`subject` varchar(64) NOT NULL,
|
||||
`destination` varchar(64) NOT NULL,
|
||||
`time_start` datetime NOT NULL,
|
||||
`duration` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `cgrid` (`cgrid`)
|
||||
);
|
||||
|
||||
--
|
||||
-- Table structure for table cdrs_extra
|
||||
--
|
||||
DROP TABLE IF EXISTS `cdrs_extra`;
|
||||
CREATE TABLE `cdrs_extra` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`cgrid` char(40) NOT NULL,
|
||||
`extra_fields` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `cgrid` (`cgrid`)
|
||||
);
|
||||
Reference in New Issue
Block a user