#show create table company \G
|
#Table: company
|
CREATE TABLE `company` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`name` varchar(50) DEFAULT NULL,
|
`locationid` bigint(20) DEFAULT NULL,
|
`personid` bigint(20) DEFAULT NULL,
|
`type` char(1) DEFAULT NULL,
|
`logonmsg` varchar(250) DEFAULT NULL,
|
`matchcheck` int(11) DEFAULT NULL,
|
`taxexempt` char(1) NOT NULL DEFAULT 'N',
|
`logo` mediumblob DEFAULT NULL,
|
`nbremployees` int(11) DEFAULT NULL,
|
`tickersymbol` varchar(15) DEFAULT NULL,
|
`website` varchar(50) DEFAULT NULL,
|
`endeffdt` date DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `name` (`name`),
|
KEY `personid` (`personid`)
|
) ENGINE=InnoDB AUTO_INCREMENT=555241 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
#show create table product \G
|
#Table: product
|
CREATE TABLE `product` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`clientid` bigint(20) NOT NULL DEFAULT 0,
|
`producttype` char(2) NOT NULL DEFAULT 'PU',
|
`producttypeid` bigint(20) NOT NULL,
|
`seasonid` bigint(20) DEFAULT NULL,
|
`vendorlocid` bigint(20) NOT NULL DEFAULT 0,
|
`sdesc` varchar(50) NOT NULL DEFAULT '',
|
`adesc` varchar(20) DEFAULT NULL,
|
`ldesc` varchar(250) DEFAULT NULL,
|
`seodesc` varchar(255) DEFAULT NULL,
|
`seotitle` varchar(255) NOT NULL,
|
`daycodeid` bigint(20) NOT NULL DEFAULT 0,
|
`holidaysetid` bigint(20) DEFAULT NULL,
|
`payablesdaycodeid` bigint(20) NOT NULL DEFAULT 0,
|
`billingperioddaycodeid` bigint(20) DEFAULT NULL,
|
`billingperiod` char(1) NOT NULL DEFAULT 'W',
|
`basepayablesdate` date DEFAULT NULL,
|
`basepayablesperioddate` date NOT NULL DEFAULT '0000-00-00',
|
`feedaycodeid` bigint(20) DEFAULT NULL,
|
`basefeedate` date DEFAULT NULL,
|
`feeperioddaycodeid` bigint(20) DEFAULT NULL,
|
`basefeeperioddate` date DEFAULT NULL,
|
`scdaycodeid` bigint(20) DEFAULT NULL,
|
`basescdate` date DEFAULT NULL,
|
`scperioddaycodeid` bigint(20) DEFAULT NULL,
|
`basescperioddate` date DEFAULT NULL,
|
`basepubdate` date DEFAULT NULL,
|
`DateLastClose` date DEFAULT NULL,
|
`returnsbasis` char(1) DEFAULT NULL,
|
`returnsfactor` int(11) DEFAULT NULL,
|
`returnsexception` char(1) DEFAULT NULL,
|
`pickupcode` char(2) NOT NULL DEFAULT 'ND',
|
`drawrounding` int(11) NOT NULL DEFAULT 1,
|
`pubgroupmethod` char(1) NOT NULL DEFAULT 'N',
|
`effdt` date NOT NULL,
|
`endeffdt` date DEFAULT NULL,
|
`sortseqnbr` int(11) DEFAULT NULL,
|
`sortseqnbr2` int(11) DEFAULT NULL,
|
`returnspct` float DEFAULT NULL,
|
`daystring` varchar(250) DEFAULT NULL,
|
`drawchangelead` int(11) NOT NULL DEFAULT 0,
|
`costcodereq` char(1) NOT NULL DEFAULT 'Y',
|
`dispublocid` bigint(20) DEFAULT NULL,
|
`adjustflag` char(1) NOT NULL DEFAULT 'N',
|
`adjustlimitpct` float DEFAULT NULL,
|
`pricebasisfactor` float NOT NULL DEFAULT 1,
|
`pricebasisunitid` bigint(20) DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `clientid` (`clientid`,`vendorlocid`),
|
KEY `sdesc` (`sdesc`),
|
KEY `sortseqnbr` (`sortseqnbr`),
|
KEY `daycodeid` (`daycodeid`),
|
KEY `seasonid` (`seasonid`),
|
KEY `endeffdt` (`endeffdt`),
|
KEY `producttype` (`producttype`),
|
KEY `holidaysetid` (`holidaysetid`),
|
KEY `payablesdaycodeid` (`payablesdaycodeid`),
|
KEY `billingperioddaycodeid` (`billingperioddaycodeid`),
|
KEY `billingperiod` (`billingperiod`),
|
KEY `feedaycodeid` (`feedaycodeid`),
|
KEY `feeperioddaycodeid` (`feeperioddaycodeid`),
|
KEY `returnsbasis` (`returnsbasis`),
|
KEY `returnsexception` (`returnsexception`),
|
KEY `pickupcode` (`pickupcode`),
|
KEY `pubgroupmethod` (`pubgroupmethod`),
|
KEY `drawrounding` (`drawrounding`),
|
KEY `returnspct` (`returnspct`),
|
KEY `producttypeid` (`producttypeid`),
|
KEY `effdt` (`effdt`)
|
) ENGINE=InnoDB AUTO_INCREMENT=16132 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
#show create table payonscan \G
|
#Table: payonscan
|
CREATE TABLE `payonscan` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`recdt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`chain` varchar(20) DEFAULT NULL,
|
`distributor` varchar(20) DEFAULT NULL,
|
`storenumber` varchar(20) DEFAULT NULL,
|
`processorid` bigint(20) DEFAULT NULL,
|
`companyid` bigint(20) DEFAULT NULL,
|
`customerid` bigint(20) DEFAULT NULL,
|
`clientlocid` bigint(20) DEFAULT NULL,
|
`companylocid` bigint(20) DEFAULT NULL,
|
`customerlocid` bigint(20) DEFAULT NULL,
|
`upc` varchar(20) DEFAULT NULL,
|
`pubproductid` bigint(20) DEFAULT NULL,
|
`distproductid` bigint(20) DEFAULT NULL,
|
`saledate` date DEFAULT NULL,
|
`specificproductid` bigint(20) DEFAULT NULL,
|
`quantity` float DEFAULT NULL,
|
`unitprice` float DEFAULT NULL,
|
`postdate` date NOT NULL,
|
`remitdate` date DEFAULT NULL,
|
`reference` varchar(50) NOT NULL,
|
`procflag` char(1) NOT NULL DEFAULT 'N',
|
`acctgprocflag` char(1) NOT NULL DEFAULT 'N',
|
`periodenddt` date DEFAULT NULL,
|
`activesession` bigint(20) NOT NULL DEFAULT 0,
|
`mapcode` char(1) NOT NULL DEFAULT 'P',
|
`lastnotifydate` date DEFAULT NULL,
|
`reportdate` date DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `storenumber` (`storenumber`),
|
KEY `specificproductid` (`specificproductid`),
|
KEY `chain` (`chain`),
|
KEY `distributor` (`distributor`),
|
KEY `distproductid` (`distproductid`),
|
KEY `procflag` (`procflag`),
|
KEY `cp29` (`processorid`,`chain`,`distributor`,`storenumber`,`upc`,`saledate`),
|
KEY `customerid` (`clientlocid`,`customerid`,`companyid`),
|
KEY `acctgprocflag` (`acctgprocflag`,`periodenddt`),
|
KEY `customerlocid` (`customerlocid`),
|
KEY `reportdate` (`reportdate`),
|
KEY `clientlocid` (`clientlocid`),
|
KEY `periodenddt` (`periodenddt`),
|
KEY `remitdate` (`remitdate`),
|
KEY `companyid` (`companyid`),
|
KEY `clientlocid_2` (`clientlocid`,`saledate`,`procflag`) USING BTREE
|
) ENGINE=InnoDB AUTO_INCREMENT=22063069 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
# show create table companymap \G
|
#Table: companymap
|
CREATE TABLE `companymap` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`clientid` bigint(20) DEFAULT 0,
|
`clientlocid` bigint(20) DEFAULT NULL,
|
`companyid` bigint(20) DEFAULT NULL,
|
`companylocid` bigint(20) DEFAULT NULL,
|
`companycode` char(3) DEFAULT NULL,
|
`fieldcode` char(2) NOT NULL DEFAULT '',
|
`companyvalue` varchar(30) NOT NULL,
|
`twcerecid` bigint(20) NOT NULL DEFAULT 0,
|
`pubsubgroupid` bigint(20) DEFAULT NULL,
|
`chaingroupid` bigint(20) DEFAULT NULL,
|
`charvar` char(1) DEFAULT NULL,
|
`comment` varchar(250) DEFAULT NULL,
|
`effdt` date DEFAULT NULL,
|
`endeffdt` date DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `companycode` (`companycode`,`fieldcode`,`companyvalue`,`twcerecid`),
|
KEY `companyid` (`companyid`),
|
KEY `clientid` (`clientid`),
|
KEY `pubsubgroupid` (`pubsubgroupid`),
|
KEY `fieldcode` (`fieldcode`),
|
KEY `companyvalue` (`companyvalue`),
|
KEY `twcerecid` (`twcerecid`),
|
KEY `chaingroupid` (`chaingroupid`),
|
KEY `clientlocid` (`clientlocid`),
|
KEY `effdt` (`effdt`),
|
KEY `endeffdt` (`endeffdt`)
|
) ENGINE=InnoDB AUTO_INCREMENT=913168 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
# show create table location \G
|
#Table: location
|
CREATE TABLE `location` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`barcode` varchar(15) DEFAULT NULL,
|
`sdesc` varchar(35) DEFAULT NULL,
|
`ldesc` varchar(250) DEFAULT NULL,
|
`type` char(1) DEFAULT NULL,
|
`latlong` varchar(30) DEFAULT NULL,
|
`addressid` bigint(20) DEFAULT NULL,
|
`logonmsg` varchar(250) DEFAULT NULL,
|
`endeffdate` date DEFAULT NULL,
|
`effdate` date DEFAULT NULL,
|
`storenbr` varchar(15) DEFAULT NULL,
|
`subgroupid` bigint(20) DEFAULT NULL,
|
`buildingid` bigint(20) DEFAULT NULL,
|
`salestaxsetid` bigint(20) DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `storenbr` (`storenbr`),
|
KEY `effdate` (`effdate`),
|
KEY `buildingid` (`buildingid`),
|
KEY `recid` (`recid`,`endeffdate`,`effdate`),
|
KEY `addressid` (`addressid`)
|
) ENGINE=InnoDB AUTO_INCREMENT=904995 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
#show create table address \G
|
#Table: address
|
CREATE TABLE `address` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`description` varchar(40) DEFAULT NULL,
|
`address1` varchar(40) DEFAULT NULL,
|
`address2` varchar(40) DEFAULT NULL,
|
`address3` varchar(40) DEFAULT NULL,
|
`address4` varchar(40) DEFAULT NULL,
|
`city` varchar(30) DEFAULT NULL,
|
`state` char(2) DEFAULT NULL,
|
`postalcode` varchar(10) DEFAULT NULL,
|
`phone` varchar(25) DEFAULT NULL,
|
`fax` varchar(15) DEFAULT NULL,
|
`neighborhoodid` bigint(20) DEFAULT NULL,
|
`county` varchar(40) DEFAULT NULL,
|
`latlong` varchar(30) DEFAULT NULL,
|
`latitude` float(20,6) DEFAULT 0.000000,
|
`longitude` float(20,6) DEFAULT 0.000000,
|
`buildingid` bigint(20) DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `postalcode` (`postalcode`),
|
KEY `phone` (`phone`),
|
KEY `latitude` (`latitude`),
|
KEY `longitude` (`longitude`),
|
KEY `buildingid` (`buildingid`)
|
) ENGINE=InnoDB AUTO_INCREMENT=1023229 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|