|
1)
|
CREATE TABLE `activesessionlog` (
|
`recid` bigint(20) NOT NULL DEFAULT 0,
|
`deviceid` bigint(20) DEFAULT NULL,
|
`channelid` bigint(20) DEFAULT NULL,
|
`channelsession` bigint(20) DEFAULT NULL,
|
`companyid` bigint(20) DEFAULT NULL,
|
`locationid` bigint(20) DEFAULT NULL,
|
`personid` bigint(20) DEFAULT NULL,
|
`pagecode` varchar(5) DEFAULT NULL,
|
`identtype` char(1) DEFAULT NULL,
|
`security` char(1) DEFAULT NULL,
|
`messageincount` int(11) DEFAULT NULL,
|
`messageoutcount` int(11) DEFAULT NULL,
|
`lockflag` char(1) DEFAULT NULL,
|
`reccreatedttm` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
`mostrecentdttm` datetime DEFAULT NULL,
|
`logindttm` datetime DEFAULT NULL,
|
`userip` varchar(20) DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `locationid` (`locationid`),
|
KEY `logindttm` (`logindttm`),
|
KEY `personid` (`personid`)
|
) *ENGINE=InnoDB* DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
1) Results From MariaDB 10.2.25 on Ubuntu 20 LTS
|
|
2)
|
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=16107 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
3)
|
CREATE TABLE `categorytypelink` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`clientid` bigint(20) NOT NULL,
|
`categoryid` bigint(20) NOT NULL,
|
`producttype` char(2) NOT NULL,
|
`producttypeid` bigint(20) NOT NULL,
|
`code` char(2) NOT NULL,
|
`endeffdt` date NOT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `clientid` (`clientid`),
|
KEY `categoryid` (`categoryid`),
|
KEY `producttypeid` (`producttypeid`)
|
) *ENGINE=InnoDB* AUTO_INCREMENT=174 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
*Here are the used tables definitions:
|
cvta0007 database:
|
*
|
4)
|
CREATE TABLE `transactivity` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`locationid` bigint(20) NOT NULL DEFAULT 0,
|
`type` char(2) NOT NULL DEFAULT '',
|
`specificrouteid` bigint(20) DEFAULT NULL,
|
`personid` bigint(20) DEFAULT NULL,
|
`datet` date DEFAULT NULL,
|
`timet` time DEFAULT NULL,
|
`customerlocid` bigint(20) DEFAULT NULL,
|
`specificproductid` bigint(20) DEFAULT NULL,
|
`actquantity` float DEFAULT NULL,
|
`unitcost` float DEFAULT NULL,
|
`unitsales` float DEFAULT NULL,
|
`unitcostcust` float DEFAULT NULL,
|
`unitsalesvend` float DEFAULT NULL,
|
`closeddatecust` date DEFAULT NULL,
|
`closeddatevendinv` date DEFAULT NULL,
|
`closeddatevend` date DEFAULT NULL,
|
`closeddatecustpay` date DEFAULT NULL,
|
`activesession` bigint(20) DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `locationid` (`locationid`),
|
KEY `closeddatecust` (`closeddatecust`),
|
KEY `specificrouteid` (`specificrouteid`),
|
KEY `customerlocid` (`customerlocid`),
|
KEY `specificproductid` (`specificproductid`),
|
KEY `closeddatevendinv` (`closeddatevendinv`),
|
KEY `closeddatecustpay` (`closeddatecustpay`),
|
KEY `type` (`type`),
|
KEY `closeddatevend` (`closeddatevend`),
|
KEY `personid` (`personid`),
|
KEY `activesession` (`activesession`),
|
KEY `datet` (`datet`,`locationid`,`customerlocid`,`type`),
|
KEY `loctypecloseddatecustpay` (`locationid`,`type`,`closeddatecustpay`)
|
) *ENGINE=MyISAM* AUTO_INCREMENT=70000081369342 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
5)
|
CREATE TABLE `specificproduct` (
|
`recid` bigint(20) NOT NULL AUTO_INCREMENT,
|
`productid` bigint(20) NOT NULL DEFAULT 0,
|
`datex` date NOT NULL DEFAULT '0000-00-00',
|
`skeddeliv` date DEFAULT NULL,
|
`skedretndate` date DEFAULT NULL,
|
`title` varchar(35) DEFAULT NULL,
|
`barcode` varchar(80) DEFAULT NULL,
|
`closedt` datetime DEFAULT NULL,
|
`closeflag` char(1) DEFAULT NULL,
|
`bundlecount` int(11) DEFAULT 1,
|
`holidaydraw` char(1) NOT NULL DEFAULT 'N',
|
`endeffdt` date DEFAULT NULL,
|
PRIMARY KEY (`recid`),
|
KEY `productid` (`productid`,`datex`,`skeddeliv`,`barcode`),
|
KEY `skedretndate` (`skedretndate`)
|
) *ENGINE=MyISAM* AUTO_INCREMENT=6463863 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|