X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=schematic-schema.sql;fp=schematic-schema.sql;h=4d1a59d9d70e1153d4474a5a7020b7153de1659c;hb=f3116511d09acfd5b32d3412c82c4337d89f2ad9;hp=acc74fc54249ecba546340174baef45b7593aa0a;hpb=6c9ba10f64c4880fd4c58527c462ef1f7841bf17;p=schematic diff --git a/schematic-schema.sql b/schematic-schema.sql index acc74fc..4d1a59d 100644 --- a/schematic-schema.sql +++ b/schematic-schema.sql @@ -135,6 +135,7 @@ CREATE TABLE `Documents` ( `dtid` int(11) DEFAULT NULL, `vid` int(11) DEFAULT NULL, `poid` int(11) DEFAULT NULL, + `filename` varchar(256) DEFAULT NULL, `document` longblob, PRIMARY KEY (`did`), KEY `dtid` (`dtid`), @@ -178,6 +179,36 @@ LOCK TABLES `History` WRITE; /*!40000 ALTER TABLE `History` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `Location` +-- + +DROP TABLE IF EXISTS `Location`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `Location` ( + `lid` int(11) NOT NULL AUTO_INCREMENT, + `vid` int(11) DEFAULT NULL, + `address` varchar(100) DEFAULT NULL, + `city` varchar(64) DEFAULT NULL, + `state` varchar(64) DEFAULT NULL, + `country` varchar(64) DEFAULT NULL, + `code` varchar(32) DEFAULT NULL, + PRIMARY KEY (`lid`), + KEY `vid` (`vid`), + CONSTRAINT `Location_ibfk_1` FOREIGN KEY (`vid`) REFERENCES `Vendor` (`vid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `Location` +-- + +LOCK TABLES `Location` WRITE; +/*!40000 ALTER TABLE `Location` DISABLE KEYS */; +/*!40000 ALTER TABLE `Location` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `Notes` -- @@ -213,6 +244,9 @@ CREATE TABLE `PurchaseOrder` ( `poid` int(11) NOT NULL AUTO_INCREMENT, `vid` int(11) DEFAULT NULL, `closed` tinyint(1) NOT NULL DEFAULT '0', + `poNumber` varchar(100) DEFAULT NULL, + `originalDate` date DEFAULT NULL, + `adjustedDate` date DEFAULT NULL, `description` varchar(200) DEFAULT NULL, PRIMARY KEY (`poid`), KEY `vid` (`vid`), @@ -245,7 +279,7 @@ CREATE TABLE `User` ( PRIMARY KEY (`uid`), KEY `ucid` (`ucid`), CONSTRAINT `User_ibfk_1` FOREIGN KEY (`ucid`) REFERENCES `UserClass` (`ucid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -254,6 +288,7 @@ CREATE TABLE `User` ( LOCK TABLES `User` WRITE; /*!40000 ALTER TABLE `User` DISABLE KEYS */; +INSERT INTO `User` VALUES (1,1,'Administrator','admin','admin_123'); /*!40000 ALTER TABLE `User` ENABLE KEYS */; UNLOCK TABLES; @@ -269,7 +304,7 @@ CREATE TABLE `UserClass` ( `privilegeLevel` int(11) NOT NULL DEFAULT '0', `description` varchar(100) DEFAULT NULL, PRIMARY KEY (`ucid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -278,6 +313,7 @@ CREATE TABLE `UserClass` ( LOCK TABLES `UserClass` WRITE; /*!40000 ALTER TABLE `UserClass` DISABLE KEYS */; +INSERT INTO `UserClass` VALUES (1,1,'Administrator'); /*!40000 ALTER TABLE `UserClass` ENABLE KEYS */; UNLOCK TABLES; @@ -291,6 +327,7 @@ DROP TABLE IF EXISTS `Vendor`; CREATE TABLE `Vendor` ( `vid` int(11) NOT NULL AUTO_INCREMENT, `vlid` int(11) DEFAULT NULL, + `signedNDA` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(100) DEFAULT NULL, PRIMARY KEY (`vid`), KEY `vlid` (`vlid`), @@ -316,6 +353,7 @@ DROP TABLE IF EXISTS `VendorGroup`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `VendorGroup` ( `vgid` int(11) NOT NULL AUTO_INCREMENT, + `seqNo` int(4) NOT NULL, `description` varchar(100) DEFAULT NULL, PRIMARY KEY (`vgid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -391,6 +429,7 @@ DROP TABLE IF EXISTS `VendorType`; CREATE TABLE `VendorType` ( `vtid` int(11) NOT NULL AUTO_INCREMENT, `vgid` int(11) DEFAULT NULL, + `seqNo` int(4) NOT NULL, `description` varchar(100) DEFAULT NULL, PRIMARY KEY (`vtid`), KEY `vgid` (`vgid`), @@ -416,4 +455,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2012-09-18 19:39:04 +-- Dump completed on 2012-09-19 21:10:12