Skip to content

Commit ecaa5c0

Browse files
author
Callan Peter Milne
committed
Added db setup stuff :P
1 parent 8d5916c commit ecaa5c0

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed

db-mysql-5-5-example.sql

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
/*
3+
-- Entities
4+
*/
5+
INSERT INTO `Entities` (`ID`,`TypeID`,`UserID`,`Created`,`Deleted`) VALUES (1118888,1878799,1,'2017-05-13 07:41:39',NULL);
6+
INSERT INTO `Entities` (`ID`,`TypeID`,`UserID`,`Created`,`Deleted`) VALUES (1118889,1878802,1,'2017-05-13 08:30:37',NULL);
7+
INSERT INTO `Entities` (`ID`,`TypeID`,`UserID`,`Created`,`Deleted`) VALUES (1118890,1878802,1,'2017-05-13 08:30:37',NULL);
8+
9+
/*
10+
-- EntityAttributes
11+
*/
12+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118888,'TotalDue','199.99','2017-05-13 07:42:27','2017-05-13 07:42:27',NULL);
13+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118888,'IssuedBy','SOME CORP PTY. LTD.','2017-05-13 08:03:33','2017-05-13 08:03:33',NULL);
14+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118888,'DateDue','2017-05-30','2017-05-13 08:03:33','2017-05-13 08:04:46',NULL);
15+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118889,'TLD','co','2017-05-13 08:32:02','2017-05-13 08:32:02',NULL);
16+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118889,'FQDN','3xqt.co','2017-05-13 08:32:02','2017-05-13 08:32:02',NULL);
17+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118889,'Registrar','MARCARIA','2017-05-13 08:32:02','2017-05-13 08:32:02',NULL);
18+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118890,'TLD','sexy','2017-05-13 08:32:02','2017-05-13 08:32:02',NULL);
19+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118890,'FQDN','awesomely.sexy','2017-05-13 08:32:02','2017-05-13 08:32:02',NULL);
20+
INSERT INTO `EntityAttributes` (`EntityID`,`AttributeKey`,`AttributeValue`,`Created`,`Modified`,`Deleted`) VALUES (1118890,'Registrar','MARCARIA','2017-05-13 08:32:02','2017-05-13 08:32:02',NULL);
21+
22+
/*
23+
-- EntityTypes
24+
*/
25+
INSERT INTO `EntityTypes` (`ID`,`UserID`,`ParentID`,`ClassName`,`Slug`,`Label`,`Created`,`Modified`,`Deleted`) VALUES (1878799,1,NULL,'TaxInvoice','tax-invoice','Tax Invoice (expense)','2017-05-13 07:38:09','2017-05-13 07:38:09',NULL);
26+
INSERT INTO `EntityTypes` (`ID`,`UserID`,`ParentID`,`ClassName`,`Slug`,`Label`,`Created`,`Modified`,`Deleted`) VALUES (1878801,1,NULL,'BankAccount','bank-account','Bank Account','2017-05-13 07:38:09','2017-05-13 07:38:09',NULL);
27+
INSERT INTO `EntityTypes` (`ID`,`UserID`,`ParentID`,`ClassName`,`Slug`,`Label`,`Created`,`Modified`,`Deleted`) VALUES (1878802,1,NULL,'DomainName','domain-name','Domain Name','2017-05-13 07:38:09','2017-05-13 07:38:09',NULL);
28+
29+
/*
30+
-- TypeAttributes
31+
*/
32+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878799,'TotalDue','Total Due',1,'0.00','2017-05-13 07:40:07','2017-05-13 08:23:36',NULL);
33+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878799,'DateDue','Date Due',1,'','2017-05-13 08:01:18','2017-05-13 08:23:36',NULL);
34+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878799,'DatePaid','Date Paid',0,'','2017-05-13 08:01:18','2017-05-13 08:23:36',NULL);
35+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878799,'IssuedBy','Issued By',1,'','2017-05-13 08:01:18','2017-05-13 08:23:36',NULL);
36+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878802,'TLD','TLD',1,'com','2017-05-13 08:30:01','2017-05-13 08:30:01',NULL);
37+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878802,'FQDN','FQDN',1,'example.com','2017-05-13 08:30:01','2017-05-13 08:30:01',NULL);
38+
INSERT INTO `TypeAttributes` (`TypeID`,`AttributeKey`,`Label`,`Required`,`DefaultValue`,`Created`,`Modified`,`Deleted`) VALUES (1878802,'Registrar','Registrar',1,NULL,'2017-05-13 08:30:01','2017-05-13 08:30:01',NULL);

db-mysql-5-5.sql

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/**
2+
* Copyright (c) 2017 Callan Peter Milne
3+
*
4+
* Permission to use, copy, modify, and/or distribute this software for any
5+
* purpose with or without fee is hereby granted, provided that the above
6+
* copyright notice and this permission notice appear in all copies.
7+
*
8+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9+
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10+
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11+
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12+
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13+
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14+
* PERFORMANCE OF THIS SOFTWARE.
15+
*/
16+
17+
CREATE TABLE `Entities` (
18+
`ID` int(11) NOT NULL AUTO_INCREMENT,
19+
`TypeID` int(11) NOT NULL,
20+
`UserID` int(11) NOT NULL,
21+
`Created` datetime NOT NULL,
22+
`Deleted` datetime DEFAULT NULL,
23+
PRIMARY KEY (`ID`),
24+
KEY `TypeID` (`TypeID`),
25+
KEY `UserID` (`UserID`),
26+
KEY `UserTypeID` (`UserID`,`TypeID`)
27+
) ENGINE=InnoDB AUTO_INCREMENT=1118891 DEFAULT CHARSET=utf8;
28+
29+
CREATE TABLE `EntityAttributes` (
30+
`EntityID` int(11) NOT NULL,
31+
`AttributeKey` varchar(64) NOT NULL,
32+
`AttributeValue` varchar(255) DEFAULT NULL,
33+
`Created` datetime NOT NULL,
34+
`Modified` datetime DEFAULT NULL,
35+
`Deleted` datetime DEFAULT NULL,
36+
KEY `EntityID` (`EntityID`),
37+
KEY `AttributeID` (`EntityID`,`AttributeKey`)
38+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
39+
40+
CREATE TABLE `EntityTypes` (
41+
`ID` int(11) NOT NULL AUTO_INCREMENT,
42+
`UserID` int(11) NOT NULL,
43+
`ParentID` int(11) DEFAULT NULL,
44+
`ClassName` varchar(45) DEFAULT NULL,
45+
`Slug` varchar(45) DEFAULT NULL,
46+
`Label` varchar(50) NOT NULL,
47+
`Created` datetime NOT NULL,
48+
`Modified` datetime DEFAULT NULL,
49+
`Deleted` datetime DEFAULT NULL,
50+
PRIMARY KEY (`ID`),
51+
KEY `UserID` (`UserID`),
52+
KEY `ParentID` (`ParentID`),
53+
KEY `UserClassType` (`UserID`,`ClassName`)
54+
) ENGINE=InnoDB AUTO_INCREMENT=1878803 DEFAULT CHARSET=utf8;
55+
56+
CREATE TABLE `TypeAttributes` (
57+
`TypeID` int(11) NOT NULL,
58+
`AttributeKey` varchar(64) NOT NULL,
59+
`Label` varchar(255) DEFAULT NULL,
60+
`Required` int(1) DEFAULT '0',
61+
`DefaultValue` varchar(255) DEFAULT NULL,
62+
`Created` datetime NOT NULL,
63+
`Modified` datetime DEFAULT NULL,
64+
`Deleted` datetime DEFAULT NULL,
65+
KEY `TypeID` (`TypeID`),
66+
KEY `AttributeID` (`TypeID`,`AttributeKey`)
67+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 commit comments

Comments
 (0)