i guess i should have put this here when it got promoted to prime time

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13980 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Raymond Chandler 2009-06-26 18:02:18 +00:00
parent f06a25fb93
commit 40dd768a3f
2 changed files with 170 additions and 0 deletions

View File

@ -0,0 +1,85 @@
-- MySQL dump 10.11
--
-- Host: lmdt.intralanman.com Database: freeswitch
-- ------------------------------------------------------
-- Server version 5.0.51a-17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `lcr`
--
DROP TABLE IF EXISTS `lcr`;
CREATE TABLE `lcr` (
`id` int(11) NOT NULL auto_increment,
`digits` varchar(15) default NULL,
`rate` float(11,5) unsigned NOT NULL,
`carrier_id` int(11) NOT NULL,
`lead_strip` int(11) NOT NULL,
`trail_strip` int(11) NOT NULL,
`prefix` varchar(16) NOT NULL,
`suffix` varchar(16) NOT NULL,
`lcr_profile` varchar(32) default NULL,
`date_start` datetime NOT NULL DEFAULT '1970-01-01',
`date_end` datetime NOT NULL DEFAULT '2030-12-31',
`quality` float(10,6) NOT NULL,
`reliability` float(10,6) NOT NULL,
`cid` varchar(32) NOT NULL DEFAULT '',
`enabled` boolean NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `carrier_id` (`carrier_id`),
KEY `digits` (`digits`),
KEY `lcr_profile` (`lcr_profile`),
KEY `rate` (`rate`),
KEY `digits_profile_cid_rate` USING BTREE (`digits`,`rate`),
CONSTRAINT `carrier_id` FOREIGN KEY (`carrier_id`) REFERENCES `carriers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
--
-- Table structure for table `carriers`
--
DROP TABLE IF EXISTS `carriers`;
CREATE TABLE `carriers` (
`id` int(11) NOT NULL auto_increment,
`carrier_name` varchar(255) default NULL,
`enabled` boolean NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
--
-- Table structure for table `carrier_gateway`
--
DROP TABLE IF EXISTS `carrier_gateway`;
CREATE TABLE `carrier_gateway` (
`id` int(11) NOT NULL auto_increment,
`carrier_id` int(11) default NULL,
`prefix` varchar(255) NOT NULL,
`suffix` varchar(255) NOT NULL,
`codec` varchar(255) NOT NULL,
`enabled` boolean NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `carrier_id` (`carrier_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2008-11-21 22:48:11

View File

@ -0,0 +1,85 @@
-- Table: carriers
-- DROP TABLE carriers;
CREATE TABLE carriers
(
id serial NOT NULL,
carrier_name VARCHAR(255) NOT NULL,
enabled boolean NOT NULL DEFAULT 'true',
CONSTRAINT carriers_pkey PRIMARY KEY (id)
);
-- Table: carrier_gateway
-- DROP TABLE carrier_gateway;
CREATE TABLE carrier_gateway
(
id serial NOT NULL,
carrier_id integer REFERENCES carriers(id),
prefix VARCHAR(128) NOT NULL DEFAULT '',
suffix VARCHAR(128) NOT NULL DEFAULT '',
codec VARCHAR(128) NOT NULL DEFAULT '',
enabled boolean NOT NULL DEFAULT 'true',
CONSTRAINT carrier_gateway_pkey PRIMARY KEY (id)
);
-- Index: gateway
-- DROP INDEX gateway;
CREATE UNIQUE INDEX gateway
ON carrier_gateway
(prefix, suffix);
-- Table: lcr
-- DROP TABLE lcr;
CREATE TABLE lcr
(
id serial NOT NULL,
digits NUMERIC(20, 0),
rate numeric(11,5) NOT NULL,
intra numeric(11,5) NOT NULL,
carrier_id integer NOT NULL REFERENCES carriers(id),
lead_strip integer NOT NULL DEFAULT 0,
trail_strip integer NOT NULL DEFAULT 0,
prefix VARCHAR(16) NOT NULL DEFAULT '',
suffix VARCHAR(16) NOT NULL DEFAULT '',
lcr_profile INTEGER NOT NULL DEFAULT 0,
date_start timestamp with time zone NOT NULL DEFAULT '1970-01-01',
date_end timestamp with time zone NOT NULL DEFAULT '2030-12-31',
quality numeric(10,6) NOT NULL DEFAULT 0,
reliability numeric(10,6) NOT NULL DEFAULT 0,
cid VARCHAR(32) NOT NULL DEFAULT '',
enabled boolean NOT NULL DEFAULT 'true',
CONSTRAINT lcr_pkey PRIMARY KEY (id)
);
-- Index: digits_rate
-- DROP INDEX digits_rate;
CREATE INDEX digits_rate
ON lcr
USING btree
(digits, rate);
-- Index: profile_digits_15
-- DROP INDEX profile_digits_15;
CREATE INDEX profile_digits_15
ON lcr
(digits, lcr_profile);
-- Index: unique_route
-- DROP INDEX unique_route;
CREATE INDEX unique_route
ON lcr
(digits, carrier_id);