initial move to git (subversion history dropped intentionally)
This commit is contained in:
48
sql/data.sql
Normal file
48
sql/data.sql
Normal file
@@ -0,0 +1,48 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 2.9.1.1-Debian-9
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: toledo.simsplace.com
|
||||
-- Generation Time: Jan 25, 2009 at 06:00 PM
|
||||
-- Server version: 5.0.51
|
||||
-- PHP Version: 5.2.0-8+etch13
|
||||
--
|
||||
-- Database: `safe-demo`
|
||||
--
|
||||
|
||||
--
|
||||
-- Dumping data for table `customers`
|
||||
--
|
||||
|
||||
INSERT INTO `customers` (`customerid`, `customername`, `attn`, `street`, `zipcode`, `city`, `country`, `vatnr`, `language`) VALUES
|
||||
(14, 'Example BV', '', 'Dummy straat', '1111 XY', 'Nergensheen', '', '', 'nl');
|
||||
|
||||
--
|
||||
-- Dumping data for table `domains`
|
||||
--
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `invoicelines`
|
||||
--
|
||||
|
||||
INSERT INTO `invoicelines` (`invoicelineid`, `invoiceid`, `customerid`, `subscriptionid`, `description`, `invoicelinedate`, `amount`, `charge`) VALUES
|
||||
(212, 1, 14, 1, 'Setup charge: SAFE as a Service hosted for Example BV', '2009-01-03', 1, 150.00),
|
||||
(213, 1, 14, 1, 'SAFE as a Service hosted for Example BV january', '2009-01-03', 1, 25.00);
|
||||
|
||||
--
|
||||
-- Dumping data for table `services`
|
||||
--
|
||||
|
||||
INSERT INTO `services` (`serviceid`, `servicename`, `nrc`, `mrc`, `qrc`, `yrc`) VALUES
|
||||
(17, 'SAFE as a Service', 150.00, 25.00, 0.00, 0.00),
|
||||
(18, 'Call charges', 0.00, 0.00, 0.00, 0.00);
|
||||
|
||||
--
|
||||
-- Dumping data for table `subscriptions`
|
||||
--
|
||||
|
||||
INSERT INTO `subscriptions` (`subscriptionid`, `customerid`, `serviceid`, `description`, `amount`, `lastinvoiced`) VALUES
|
||||
(1, 14, 17, 'hosted for Example BV', 1, '2009-01-03'),
|
||||
(2, 14, 18, 'example_sip', 1, '2009-01-25');
|
||||
|
||||
114
sql/schema.sql
Normal file
114
sql/schema.sql
Normal file
@@ -0,0 +1,114 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 2.9.1.1-Debian-9
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: toledo.simsplace.com
|
||||
-- Generation Time: Jan 03, 2009 at 08:57 PM
|
||||
-- Server version: 5.0.51
|
||||
-- PHP Version: 5.2.0-8+etch13
|
||||
--
|
||||
-- Database: `safe`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `customers`
|
||||
--
|
||||
|
||||
CREATE TABLE `customers` (
|
||||
`customerid` bigint(20) NOT NULL auto_increment,
|
||||
`customername` varchar(80) NOT NULL,
|
||||
`attn` varchar(80) NOT NULL,
|
||||
`street` varchar(80) NOT NULL,
|
||||
`zipcode` varchar(80) NOT NULL,
|
||||
`city` varchar(80) NOT NULL,
|
||||
`country` varchar(80) NOT NULL,
|
||||
`vatnr` varchar(20) NOT NULL,
|
||||
`language` varchar(2) NOT NULL default 'nl',
|
||||
PRIMARY KEY (`customerid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `domains`
|
||||
--
|
||||
|
||||
CREATE TABLE `domains` (
|
||||
`domainid` bigint(20) NOT NULL auto_increment,
|
||||
`domain` varchar(120) NOT NULL,
|
||||
`rsp` varchar(120) NOT NULL,
|
||||
`registrar` varchar(120) NOT NULL,
|
||||
`whoisglue` varchar(120) NOT NULL,
|
||||
`dnshosts` varchar(120) NOT NULL,
|
||||
`mxhosts` varchar(120) NOT NULL,
|
||||
`web` varchar(120) NOT NULL,
|
||||
PRIMARY KEY (`domainid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=91 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `invoicelines`
|
||||
--
|
||||
|
||||
CREATE TABLE `invoicelines` (
|
||||
`invoicelineid` bigint(20) NOT NULL auto_increment,
|
||||
`invoiceid` bigint(20) default NULL,
|
||||
`customerid` bigint(20) NOT NULL,
|
||||
`subscriptionid` bigint(20) default NULL,
|
||||
`description` varchar(80) NOT NULL,
|
||||
`invoicelinedate` date NOT NULL,
|
||||
`amount` float NOT NULL default '1',
|
||||
`charge` decimal(10,2) NOT NULL,
|
||||
PRIMARY KEY (`invoicelineid`),
|
||||
KEY `customerid` (`customerid`),
|
||||
KEY `customerserviceid` (`subscriptionid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=210 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `services`
|
||||
--
|
||||
|
||||
CREATE TABLE `services` (
|
||||
`serviceid` bigint(20) NOT NULL auto_increment,
|
||||
`servicename` varchar(128) NOT NULL,
|
||||
`nrc` decimal(10,2) NOT NULL,
|
||||
`mrc` decimal(10,2) NOT NULL,
|
||||
`qrc` decimal(10,2) NOT NULL,
|
||||
`yrc` decimal(10,2) NOT NULL,
|
||||
PRIMARY KEY (`serviceid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `subscriptions`
|
||||
--
|
||||
|
||||
CREATE TABLE `subscriptions` (
|
||||
`subscriptionid` bigint(20) NOT NULL auto_increment,
|
||||
`customerid` bigint(20) NOT NULL,
|
||||
`serviceid` bigint(20) NOT NULL,
|
||||
`description` varchar(80) NOT NULL,
|
||||
`amount` bigint(20) NOT NULL default '1',
|
||||
`lastinvoiced` date NOT NULL,
|
||||
PRIMARY KEY (`subscriptionid`),
|
||||
KEY `customerid` (`customerid`),
|
||||
KEY `serviceid` (`serviceid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=76 ;
|
||||
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `subscriptions`
|
||||
--
|
||||
ALTER TABLE `subscriptions`
|
||||
ADD CONSTRAINT `subscriptions_ibfk_1` FOREIGN KEY (`customerid`) REFERENCES `customers` (`customerid`),
|
||||
ADD CONSTRAINT `subscriptions_ibfk_2` FOREIGN KEY (`serviceid`) REFERENCES `services` (`serviceid`);
|
||||
|
||||
Reference in New Issue
Block a user