-- MySQL dump 9.10
--
-- Host: localhost    Database: HS_DevelopmentStore
-- ------------------------------------------------------
-- Server version	4.0.17-max

--
-- Table structure for table `adminuser`
--

CREATE TABLE adminuser (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Active char(1) default NULL,
  AdminGroup text,
  FirstName text,
  LastName text,
  Username varchar(80) default NULL,
  Password varchar(80) default NULL,
  Notes text,
  Permissions text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `adminuseractivity`
--

CREATE TABLE adminuseractivity (
  ID bigint(20) unsigned NOT NULL auto_increment,
  AdminUserID bigint(20) unsigned default NULL,
  Area varchar(40) default NULL,
  Type varchar(20) default NULL,
  Notes text,
  DateCreated datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `affiliate`
--

CREATE TABLE affiliate (
  ID bigint(20) unsigned NOT NULL auto_increment,
  AffiliateID text,
  Status varchar(9) default NULL,
  Type text,
  FirstName text,
  LastName text,
  Company text,
  Address1 text,
  Address2 text,
  City text,
  State text,
  Postal text,
  Country text,
  Phone text,
  Fax text,
  Email text,
  URL text,
  Password text,
  PayoutDays tinyint(3) unsigned default NULL,
  ContractOnFile char(1) default NULL,
  ContractExpirationDate date default NULL,
  CreditAffiliateIDPresent char(1) default NULL,
  CreditNoAffiliateIDWeb char(1) default NULL,
  CreditNoAffiliateIDAdmin char(1) default NULL,
  CreditAllAutoships char(1) default NULL,
  CreditOwnAutoships char(1) default NULL,
  CreditRefunds char(1) default NULL,
  RefundType char(1) default NULL,
  EligibilityDate date default NULL,
  EligibilityExpirationDate date default NULL,
  EligibilityExpirationNoticeDate date default NULL,
  EligibilityDays int(11) unsigned default NULL,
  EligibilityNoticeDays int(11) unsigned default NULL,
  EligibilityShipCount int(11) unsigned default NULL,
  EligibilityShipValue decimal(10,2) unsigned default NULL,
  CompensationPlan text,
  CompensationAmount text,
  SubsequentCompensationPlan text,
  SubsequentCompensationAmount text,
  SubsequentCompensationDays int(11) unsigned default NULL,
  AutoshipCompensationPlan text,
  AutoshipCompensationAmount text,
  AutoshipSubsequentCompensationPlan text,
  AutoshipSubsequentCompensationAmount text,
  AutoshipSubsequentCompensationDays int(11) unsigned default NULL,
  InvoiceMessage text,
  OrderQuantity int(11) default NULL,
  OrderTotal decimal(10,2) default NULL,
  AdminComments text,
  Referrals bigint(20) default NULL,
  DateCreated datetime default NULL,
  CreatedAdminUserID bigint(28) unsigned default NULL,
  ModifiedAdminUserID bigint(28) unsigned default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY AffiliateID (AffiliateID(20)),
  KEY EmailPassword (Email(20),Password(8))
) TYPE=MyISAM;

--
-- Table structure for table `affiliatenotes`
--

CREATE TABLE affiliatenotes (
  ID bigint(20) unsigned NOT NULL auto_increment,
  AffiliateID text,
  AdminUserID bigint(20) unsigned default NULL,
  Notes text,
  DateCreated datetime default NULL,
  PRIMARY KEY  (ID),
  KEY AffiliateIDDateCreated (AffiliateID(20),DateCreated)
) TYPE=MyISAM;

--
-- Table structure for table `article`
--

CREATE TABLE article (
  ArticleID bigint(20) unsigned NOT NULL auto_increment,
  Publish char(1) default NULL,
  Category varchar(80) default NULL,
  SubCategory varchar(80) default NULL,
  SubCategory2 varchar(80) default NULL,
  SubCategory3 varchar(80) default NULL,
  Keywords text,
  Title text,
  DateOfArticle datetime default NULL,
  Author text,
  Publication text,
  Copyright text,
  ArticleHasHTML char(1) default NULL,
  ArticleText text,
  InfoHasHTML char(1) default NULL,
  AdditionalInfo text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ArticleID)
) TYPE=MyISAM;

--
-- Table structure for table `articletoproductmapping`
--

CREATE TABLE articletoproductmapping (
  ArticleMappingID bigint(20) unsigned NOT NULL auto_increment,
  ArticleID bigint(20) default NULL,
  ProductID text,
  Publish char(1) default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ArticleMappingID)
) TYPE=MyISAM;

--
-- Table structure for table `autoshiporderqueue`
--

CREATE TABLE autoshiporderqueue (
  ID bigint(20) unsigned NOT NULL auto_increment,
  CustomerID bigint(20) unsigned default NULL,
  AffiliateID bigint(20) unsigned default NULL,
  OrderID bigint(20) unsigned default NULL,
  DateOrdered datetime default NULL,
  Active char(1) default NULL,
  DateActivated datetime default NULL,
  DateDeactivated datetime default NULL,
  Frequency tinyint(3) unsigned default NULL,
  TimesExecuted tinyint(3) unsigned default NULL,
  RestrictedDuration char(1) default NULL,
  Duration tinyint(3) default NULL,
  OrderAction text,
  NextOrderDate date default NULL,
  OrderHistory text,
  Notes text,
  AuditTrail text,
  Item text,
  FirstName text,
  LastName text,
  Company text,
  Address1 text,
  Address2 text,
  City text,
  State text,
  Postal text,
  Country text,
  Phone text,
  Fax text,
  Email text,
  NotificationMethod char(1) default NULL,
  PaymentType text,
  PONumber text,
  Account text,
  AccountMD5 varchar(32) default NULL,
  Routing text,
  CheckNumber int(11) default NULL,
  CheckSignature text,
  Expiration varchar(7) default NULL,
  IsDebitCard char(1) default 'N',
  SignatureOnFile char(1) default 'N',
  PromotionID text,
  PromotionBeginDate date default NULL,
  PromotionEndDate date default NULL,
  OriginalValue decimal(10,2) default NULL,
  CurrentValue decimal(10,2) default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `autoshiporderqueueitem`
--

CREATE TABLE autoshiporderqueueitem (
  ID bigint(20) unsigned NOT NULL auto_increment,
  AutoShipOrderQueueID bigint(20) unsigned default NULL,
  CustomerID bigint(20) unsigned default NULL,
  ProductID text,
  Quantity int(11) default NULL,
  Price decimal(10,2) default NULL,
  TotalPrice decimal(10,2) default NULL,
  Attributes tinyint(4) default NULL,
  Attribute1 text,
  Attribute2 text,
  Attribute3 text,
  Attribute4 text,
  Attribute5 text,
  Attribute6 text,
  Attribute7 text,
  Attribute8 text,
  Attribute9 text,
  Attribute10 text,
  Attribute11 text,
  Attribute12 text,
  Attribute13 text,
  Attribute14 text,
  Attribute15 text,
  Attribute16 text,
  Attribute17 text,
  Attribute18 text,
  Attribute19 text,
  Attribute20 text,
  Attribute21 text,
  Attribute22 text,
  Attribute23 text,
  Attribute24 text,
  Attribute25 text,
  Attribute26 text,
  Attribute27 text,
  Attribute28 text,
  Attribute29 text,
  Attribute30 text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `autoshiporderqueuenotes`
--

CREATE TABLE autoshiporderqueuenotes (
  ID bigint(20) unsigned NOT NULL auto_increment,
  AutoShipOrderQueueID bigint(20) unsigned default NULL,
  AdminUserID bigint(20) unsigned default NULL,
  Notes text,
  DateCreated datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `customer`
--

CREATE TABLE customer (
  ID bigint(20) unsigned NOT NULL auto_increment,
  AffiliateID text,
  OwnerID bigint(20) unsigned default NULL,
  TempCustomerID varchar(28) default NULL,
  PriceGroupID bigint(20) unsigned default NULL,
  EntryName text,
  FirstName text,
  LastName text,
  Company text,
  Address1 text,
  Address2 text,
  City text,
  State text,
  Postal text,
  Country text,
  Phone text,
  Fax text,
  Email text,
  Password text,
  AuthorizedToUseAccount text,
  OrderPriority tinyint(1) default '9',
  EmailNotifyStatusChanges char(1) default NULL,
  ShippingVendor text,
  ShippingAccount text,
  Newsletter char(1) default NULL,
  PublicWishList char(1) default NULL,
  ApprovedForPO char(1) default NULL,
  Notes text,
  EmailGroups text,
  AffiliateOwnershipDate date default NULL,
  AffiliateShipCount int(11) unsigned default NULL,
  AffiliateShipValue decimal(10,2) unsigned default NULL,
  LastShipDate date default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  MembershipCreated datetime default NULL,
  MembershipExpires datetime default NULL,
  PRIMARY KEY  (ID),
  KEY OwnerIDEntryName (OwnerID,EntryName(20)),
  KEY EntryNameEmailPassword (EntryName(20),Email(20),Password(8)),
  KEY CustomerIDEntryName (ID,EntryName(20)),
  KEY DateCreated (DateCreated),
  KEY TempCustomerID (TempCustomerID)
) TYPE=MyISAM;

--
-- Table structure for table `customernotes`
--

CREATE TABLE customernotes (
  ID bigint(20) unsigned NOT NULL auto_increment,
  CustomerID bigint(20) unsigned default NULL,
  AdminUserID bigint(20) unsigned default NULL,
  Notes text,
  DateCreated datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `emailarchive`
--

CREATE TABLE emailarchive (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Type char(2) default NULL,
  EmailGroup text,
  CustomerID bigint(20) unsigned default NULL,
  HeaderTo text,
  HeaderCC text,
  HeaderBCC text,
  HeaderFrom text,
  HeaderSubject text,
  Body text,
  Message text,
  ReadByIDs text,
  SentByID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY SentByID (SentByID)
) TYPE=MyISAM;

--
-- Table structure for table `emailtemplate`
--

CREATE TABLE emailtemplate (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Active char(1) default NULL,
  Category text,
  Name text,
  Subject text,
  Body longtext,
  Keywords text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY ActiveName (Active,Name(20))
) TYPE=MyISAM;

--
-- Table structure for table `hs_article`
--

CREATE TABLE hs_article (
  ArticleID bigint(20) unsigned NOT NULL auto_increment,
  Category varchar(80) default NULL,
  SubCategory varchar(80) default NULL,
  SubCategory2 varchar(80) default NULL,
  SubCategory3 varchar(80) default NULL,
  Title text,
  DateOfArticle datetime default NULL,
  Author text,
  Publication text,
  Copyright text,
  ArticleHasHTML char(1) default NULL,
  ArticleText text,
  InfoHasHTML char(1) default NULL,
  AdditionalInfo text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ArticleID)
) TYPE=MyISAM;

--
-- Table structure for table `hs_articlemapping`
--

CREATE TABLE hs_articlemapping (
  ArticleMappingID bigint(20) unsigned NOT NULL auto_increment,
  ArticleID bigint(20) default NULL,
  ProductID text,
  Publish char(1) default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ArticleMappingID)
) TYPE=MyISAM;

--
-- Table structure for table `internalmessage`
--

CREATE TABLE internalmessage (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ParentID bigint(20) unsigned default NULL,
  Thread text,
  FromAdminUserID bigint(20) default NULL,
  ToAdminUserID bigint(20) default NULL,
  DateSent datetime default NULL,
  Subject text,
  Body longtext,
  DateRead datetime default NULL,
  DateAcknowledged datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `inventory_cyclecountadjustments`
--

CREATE TABLE inventory_cyclecountadjustments (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Type text,
  ProductID text,
  LotNumber text,
  Quantity bigint(20) default NULL,
  OriginalRecordID bigint(20) unsigned default NULL,
  Notes text,
  AdjustedByAdminUserID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `inventory_finishedproduct`
--

CREATE TABLE inventory_finishedproduct (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ProductID text,
  LotNumber text,
  Status text,
  Quantity bigint(20) default NULL,
  FinishedByAdminUserID bigint(20) unsigned default NULL,
  ItemID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `inventory_manifest`
--

CREATE TABLE inventory_manifest (
  ID bigint(20) unsigned NOT NULL auto_increment,
  DateReceived date default NULL,
  ReceivedByAdminUserID bigint(20) unsigned default NULL,
  PONumber text,
  Supplier text,
  Notes text,
  CreatedByAdminUserID bigint(20) unsigned default NULL,
  ModifiedByAdminUserID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `inventory_productids`
--

CREATE TABLE inventory_productids (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Active char(1) default NULL,
  ProductID text,
  Name text,
  Description text,
  IsRawProduct char(1) default NULL,
  IsFinishedProduct char(1) default NULL,
  CreatedByAdminUserID bigint(20) unsigned default NULL,
  ModifiedByAdminUserID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY ActiveRaw (Active,IsRawProduct),
  KEY ActiveFinished (Active,IsFinishedProduct)
) TYPE=MyISAM;

--
-- Table structure for table `inventory_rawproducttofinishedproduct`
--

CREATE TABLE inventory_rawproducttofinishedproduct (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ReceivedProductID bigint(20) unsigned default NULL,
  FinishedProductID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `inventory_receivedproduct`
--

CREATE TABLE inventory_receivedproduct (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ManifestID bigint(20) unsigned default NULL,
  ProductID text,
  ItemID bigint(20) unsigned default NULL,
  LotNumber text,
  Quantity bigint(20) default NULL,
  Status text,
  Notes text,
  ReceivedByAdminUserID bigint(20) unsigned default NULL,
  InspectedByAdminUserID bigint(20) unsigned default NULL,
  CreatedByAdminUserID bigint(20) unsigned default NULL,
  ModifiedByAdminUserID bigint(20) unsigned default NULL,
  DateInspected datetime default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY Status (Status(10))
) TYPE=MyISAM;

--
-- Table structure for table `invoice`
--

CREATE TABLE invoice (
  ID bigint(20) unsigned NOT NULL auto_increment,
  TempID varchar(28) default NULL,
  RefundInvoiceID bigint(20) unsigned default NULL,
  AutoShipOrderQueueID bigint(20) unsigned NOT NULL default '0',
  OrderID varchar(28) default NULL,
  CustomerID bigint(20) unsigned default NULL,
  AdminUserID bigint(20) unsigned default NULL,
  AffiliateID text,
  OriginalAffiliateID text,
  Source text,
  FirstName text,
  LastName text,
  Company text,
  Address1 text,
  Address2 text,
  City text,
  State text,
  Postal text,
  Country text,
  Phone text,
  Fax text,
  Email text,
  ItemCount int(11) default NULL,
  SubTotal decimal(10,2) default NULL,
  TaxLevel1 decimal(10,2) default NULL,
  TaxLevel2 decimal(10,2) default NULL,
  TaxLevel3 decimal(10,2) default NULL,
  Tax decimal(10,2) default NULL,
  Shipping decimal(10,2) default NULL,
  Total decimal(10,2) default NULL,
  PaymentType text,
  PONumber text,
  Account text,
  AccountMD5 varchar(32) default NULL,
  Routing text,
  CheckNumber int(11) default NULL,
  CheckSignature text,
  Expiration varchar(7) default NULL,
  Approved char(1) default NULL,
  ApprovalCode text,
  ShippingVendor text,
  TrackingNumber text,
  ActualPostage decimal(10,2) default NULL,
  ActualHandling decimal(10,2) default NULL,
  Status text,
  TransactionID text,
  AVSResult text,
  ApprovalMessage text,
  AuthorizationCode text,
  CaptureTransactionID text,
  CaptureAVSResult text,
  CaptureApprovalMessage text,
  CaptureAuthorizationCode text,
  CaptureApprovalCode text,
  AdminPaymentComments text,
  AdminComments text,
  CustomerComments text,
  PhysicalPossession varchar(4) default NULL,
  CancelReason text,
  PromotionCode text,
  Discount decimal(10,2) default NULL,
  SubTotalAdjustment decimal(10,2) default NULL,
  ShippingAdjustment decimal(10,2) default NULL,
  TaxAdjustment decimal(10,2) default NULL,
  DiscountAdjustment decimal(10,2) default NULL,
  SettlementAdjustment decimal(10,2) default NULL,
  AffiliateAdjustment decimal(10,2) default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  DateScheduled date default NULL,
  DatePosted datetime default NULL,
  DateAuthorized datetime default NULL,
  DateProcessed datetime default NULL,
  DateInvoiced datetime default NULL,
  DateBackOrdered datetime default NULL,
  DateShipped datetime default NULL,
  DateDelivered datetime default NULL,
  DateCaptured datetime default NULL,
  DateCanceled datetime default NULL,
  DateDeclined datetime default NULL,
  DateApproved datetime default NULL,
  DateVoided datetime default NULL,
  DateCanceledPending datetime default NULL,
  DateSettled datetime default NULL,
  SettlementBatch text,
  ExportBatch text,
  SortBatch text,
  IPAddress varchar(15) default NULL,
  AffiliatePayoutExplanation text,
  AffiliateTheoreticalPayout decimal(10,2) default NULL,
  AffiliatePlan text,
  AffiliatePayout text,
  AutoShipGenerated char(1) default NULL,
  AutoShipNextOrderDate date default NULL,
  TermsAndConditions char(1) default NULL,
  PRIMARY KEY  (ID),
  KEY StatusDateCreated (Status(2),DateCreated),
  KEY DateCreated (DateCreated),
  KEY OrderID (OrderID),
  KEY CustomerIDDatePosted (CustomerID,DatePosted),
  KEY DatePosted (DatePosted),
  KEY DateSettled (DateSettled),
  KEY ApprovedStatusDatePostedCustomerID (Approved,Status(2),DatePosted,CustomerID),
  KEY ApprovedStatusAffiliateID (Approved,Status(2),AffiliateID(20)),
  KEY IDCustomerID (ID,CustomerID),
  KEY StatusCustomerIDPromotionCode (Status(2),CustomerID,PromotionCode(20)),
  KEY CustomerIDStatusAffiliateID (CustomerID,Status(10),AffiliateID(10))
) TYPE=MyISAM;

--
-- Table structure for table `item`
--

CREATE TABLE item (
  ID bigint(20) unsigned NOT NULL auto_increment,
  OrderID varchar(28) default NULL,
  OrderStatus varchar(20) default NULL,
  CustomerID bigint(20) unsigned default NULL,
  WishListOwnerID bigint(20) unsigned default NULL,
  CartName varchar(80) default NULL,
  CartEmail varchar(80) default NULL,
  CartExpires date default NULL,
  ProductID text,
  ShadowProducts text,
  ItemType text,
  ProductName text,
  EnforceInventory char(1) default NULL,
  Quantity int(11) default NULL,
  Price decimal(10,2) default NULL,
  TotalPrice decimal(10,2) default NULL,
  Taxable char(1) default NULL,
  TaxClass text,
  ShippingType varchar(20) default NULL,
  ShippingValue decimal(10,2) default NULL,
  Attributes tinyint(4) default NULL,
  Attribute1 text,
  Attribute2 text,
  Attribute3 text,
  Attribute4 text,
  Attribute5 text,
  Attribute6 text,
  Attribute7 text,
  Attribute8 text,
  Attribute9 text,
  Attribute10 text,
  Attribute11 text,
  Attribute12 text,
  Attribute13 text,
  Attribute14 text,
  Attribute15 text,
  Attribute16 text,
  Attribute17 text,
  Attribute18 text,
  Attribute19 text,
  Attribute20 text,
  Attribute21 text,
  Attribute22 text,
  Attribute23 text,
  Attribute24 text,
  Attribute25 text,
  Attribute26 text,
  Attribute27 text,
  Attribute28 text,
  Attribute29 text,
  Attribute30 text,
  LotNumber text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  DateShipped datetime default NULL,
  DateDelivered datetime default NULL,
  DateCanceled datetime default NULL,
  Cost decimal(10,2) default NULL,
  CostDetail text,
  ShippingVendor text,
  TrackingNumber text,
  Comment text,
  DateBackOrdered datetime default NULL,
  DateProcessed datetime default NULL,
  IsMembership char(1) default NULL,
  MemberPlanDays int(11) default NULL,
  MemberOnlyItem char(1) default NULL,
  UseEAD char(1) default NULL,
  EADContentType text,
  EADFileNames varchar(120) default NULL,
  EADDownloadLimit int(11) default NULL,
  EADTimeLimit int(11) default NULL,
  EADTimesDownloaded int(11) default NULL,
  Restricted char(1) default NULL,
  SupplierID varchar(23) default NULL,
  PRIMARY KEY  (ID),
  KEY CustomerIDOrderStatus (CustomerID,OrderStatus(2)),
  KEY OrderIDItemTypeProductID (OrderID,ItemType(1),ProductID(20)),
  KEY OrderIDProductIDPrice (OrderID,ProductID(20),Price),
  KEY OrderStatusItemTypeDateCreatedProductID (OrderStatus(1),ItemType(1),DateCreated,ProductID(20))
) TYPE=MyISAM;

--
-- Table structure for table `pricegroup`
--

CREATE TABLE pricegroup (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Active char(1) default NULL,
  Name varchar(80) default NULL,
  Type char(1) default NULL,
  Value decimal(8,5) default NULL,
  TaxExempt char(1) default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY ActiveName (Active,Name(20))
) TYPE=MyISAM;

--
-- Table structure for table `pricegrouppricing`
--

CREATE TABLE pricegrouppricing (
  ID bigint(20) unsigned NOT NULL auto_increment,
  PriceGroupID bigint(20) unsigned default NULL,
  ProductID text,
  Price text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `product`
--

CREATE TABLE product (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ProductID text,
  ShadowProducts text,
  PageTitle text,
  MetaKeywords text,
  MetaDescription text,
  ProductName text,
  WebSell char(1) default NULL,
  Featured char(1) default NULL,
  IsMembership char(1) default NULL,
  MemberPlanDays int(11) default NULL,
  MemberOnlyItem char(1) default NULL,
  BaseCost decimal(10,2) unsigned default NULL,
  MSRP decimal(10,2) unsigned default NULL,
  Price decimal(10,2) unsigned default NULL,
  MemberPrice decimal(10,2) unsigned default NULL,
  SalePrice decimal(10,2) unsigned default NULL,
  OnSale char(1) default NULL,
  VolumePrice text,
  AutoshipPriceAdjustment decimal(10,2) default NULL,
  OnHand bigint(20) default NULL,
  BuildTo bigint(20) default NULL,
  WebSellQty int(11) default NULL,
  EnforceInventory char(1) default NULL,
  OutOfStockNotify char(1) default NULL,
  OutOfStockDisplay char(1) default NULL,
  OutOfStockMessage text,
  QuantitySold bigint(20) default NULL,
  Department text,
  Category text,
  SubCategory text,
  SubCategory2 text,
  SubCategory3 text,
  Manufacturer text,
  SearchRank tinyint(2) default NULL,
  InternalSalesNotes text,
  BriefHasHTML char(1) default NULL,
  BriefDescription text,
  DescHasHTML char(1) default NULL,
  Description text,
  Complement1 text,
  Complement2 text,
  Complement3 text,
  Complement4 text,
  Complement5 text,
  Complement6 text,
  Taxable char(1) default NULL,
  TaxClass text,
  ShippingType text,
  ShippingValue decimal(10,2) unsigned default NULL,
  QuantitySearched bigint(20) unsigned default NULL,
  QuantityViewed bigint(20) default NULL,
  QuantityInCart bigint(20) default NULL,
  Autoshippable char(1) default NULL,
  Attributes char(2) default NULL,
  Attribute1Name text,
  Attribute2Name text,
  Attribute3Name text,
  Attribute4Name text,
  Attribute5Name text,
  Attribute6Name text,
  Attribute7Name text,
  Attribute8Name text,
  Attribute9Name text,
  Attribute10Name text,
  Attribute11Name text,
  Attribute12Name text,
  Attribute13Name text,
  Attribute14Name text,
  Attribute15Name text,
  Attribute16Name text,
  Attribute17Name text,
  Attribute18Name text,
  Attribute19Name text,
  Attribute20Name text,
  Attribute21Name text,
  Attribute22Name text,
  Attribute23Name text,
  Attribute24Name text,
  Attribute25Name text,
  Attribute26Name text,
  Attribute27Name text,
  Attribute28Name text,
  Attribute29Name text,
  Attribute30Name text,
  Attribute1Values text,
  Attribute2Values text,
  Attribute3Values text,
  Attribute4Values text,
  Attribute5Values text,
  Attribute6Values text,
  Attribute7Values text,
  Attribute8Values text,
  Attribute9Values text,
  Attribute10Values text,
  Attribute11Values text,
  Attribute12Values text,
  Attribute13Values text,
  Attribute14Values text,
  Attribute15Values text,
  Attribute16Values text,
  Attribute17Values text,
  Attribute18Values text,
  Attribute19Values text,
  Attribute20Values text,
  Attribute21Values text,
  Attribute22Values text,
  Attribute23Values text,
  Attribute24Values text,
  Attribute25Values text,
  Attribute26Values text,
  Attribute27Values text,
  Attribute28Values text,
  Attribute29Values text,
  Attribute30Values text,
  Attribute1Prices text,
  Attribute2Prices text,
  Attribute3Prices text,
  Attribute4Prices text,
  Attribute5Prices text,
  Attribute6Prices text,
  Attribute7Prices text,
  Attribute8Prices text,
  Attribute9Prices text,
  Attribute10Prices text,
  Attribute11Prices text,
  Attribute12Prices text,
  Attribute13Prices text,
  Attribute14Prices text,
  Attribute15Prices text,
  Attribute16Prices text,
  Attribute17Prices text,
  Attribute18Prices text,
  Attribute19Prices text,
  Attribute20Prices text,
  Attribute21Prices text,
  Attribute22Prices text,
  Attribute23Prices text,
  Attribute24Prices text,
  Attribute25Prices text,
  Attribute26Prices text,
  Attribute27Prices text,
  Attribute28Prices text,
  Attribute29Prices text,
  Attribute30Prices text,
  Attribute1Description varchar(8) default NULL,
  Attribute2Description varchar(8) default NULL,
  Attribute3Description varchar(8) default NULL,
  Attribute4Description varchar(8) default NULL,
  Attribute5Description varchar(8) default NULL,
  Attribute6Description varchar(8) default NULL,
  Attribute7Description varchar(8) default NULL,
  Attribute8Description varchar(8) default NULL,
  Attribute9Description varchar(8) default NULL,
  Attribute10Description varchar(8) default NULL,
  Attribute11Description varchar(8) default NULL,
  Attribute12Description varchar(8) default NULL,
  Attribute13Description varchar(8) default NULL,
  Attribute14Description varchar(8) default NULL,
  Attribute15Description varchar(8) default NULL,
  Attribute16Description varchar(8) default NULL,
  Attribute17Description varchar(8) default NULL,
  Attribute18Description varchar(8) default NULL,
  Attribute19Description varchar(8) default NULL,
  Attribute20Description varchar(8) default NULL,
  Attribute21Description varchar(8) default NULL,
  Attribute22Description varchar(8) default NULL,
  Attribute23Description varchar(8) default NULL,
  Attribute24Description varchar(8) default NULL,
  Attribute25Description varchar(8) default NULL,
  Attribute26Description varchar(8) default NULL,
  Attribute27Description varchar(8) default NULL,
  Attribute28Description varchar(8) default NULL,
  Attribute29Description varchar(8) default NULL,
  Attribute30Description varchar(8) default NULL,
  Attribute1PartNumbers text,
  Attribute2PartNumbers text,
  Attribute3PartNumbers text,
  Attribute4PartNumbers text,
  Attribute5PartNumbers text,
  Attribute6PartNumbers text,
  Attribute7PartNumbers text,
  Attribute8PartNumbers text,
  Attribute9PartNumbers text,
  Attribute10PartNumbers text,
  Attribute11PartNumbers text,
  Attribute12PartNumbers text,
  Attribute13PartNumbers text,
  Attribute14PartNumbers text,
  Attribute15PartNumbers text,
  Attribute16PartNumbers text,
  Attribute17PartNumbers text,
  Attribute18PartNumbers text,
  Attribute19PartNumbers text,
  Attribute20PartNumbers text,
  Attribute21PartNumbers text,
  Attribute22PartNumbers text,
  Attribute23PartNumbers text,
  Attribute24PartNumbers text,
  Attribute25PartNumbers text,
  Attribute26PartNumbers text,
  Attribute27PartNumbers text,
  Attribute28PartNumbers text,
  Attribute29PartNumbers text,
  Attribute30PartNumbers text,
  Attribute1PartQuantities text,
  Attribute2PartQuantities text,
  Attribute3PartQuantities text,
  Attribute4PartQuantities text,
  Attribute5PartQuantities text,
  Attribute6PartQuantities text,
  Attribute7PartQuantities text,
  Attribute8PartQuantities text,
  Attribute9PartQuantities text,
  Attribute10PartQuantities text,
  Attribute11PartQuantities text,
  Attribute12PartQuantities text,
  Attribute13PartQuantities text,
  Attribute14PartQuantities text,
  Attribute15PartQuantities text,
  Attribute16PartQuantities text,
  Attribute17PartQuantities text,
  Attribute18PartQuantities text,
  Attribute19PartQuantities text,
  Attribute20PartQuantities text,
  Attribute21PartQuantities text,
  Attribute22PartQuantities text,
  Attribute23PartQuantities text,
  Attribute24PartQuantities text,
  Attribute25PartQuantities text,
  Attribute26PartQuantities text,
  Attribute27PartQuantities text,
  Attribute28PartQuantities text,
  Attribute29PartQuantities text,
  Attribute30PartQuantities text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  UseEAD char(1) default NULL,
  EADContentType text,
  EADFileNames varchar(120) default NULL,
  EADDownloadLimit int(11) default NULL,
  EADTimeLimit int(11) default NULL,
  PerOrderMin bigint(20) default NULL,
  PerOrderMax bigint(20) default NULL,
  PerCustomerMax bigint(20) default NULL,
  RestrictClass text,
  RestrictTo text,
  PriceGroup text,
  IsGiftCertificate char(1) default NULL,
  GiftCertificateUse char(3) default NULL,
  GiftCertificateValue decimal(10,2) default NULL,
  WaitList text,
  ContentPage text,
  SupplierID bigint(20) unsigned default NULL,
  SupplierNotify char(1) default NULL,
  PRIMARY KEY  (ID),
  KEY Department (Department(20)),
  KEY CategoryDepartment (Category(20),Department(20)),
  KEY ProductID (ProductID(20)),
  KEY Category (Category(20)),
  KEY SubCategory (SubCategory(20)),
  KEY CategorySubCategory (Category(20),SubCategory(20)),
  KEY Manufacturer (Manufacturer(20)),
  KEY WebSellFeatured (WebSell,Featured),
  KEY QuantitySold (QuantitySold),
  KEY WebSellQuantitySold (WebSell,QuantitySold),
  KEY AutoshippableProductName (Autoshippable,ProductName(30))
) TYPE=MyISAM;

--
-- Table structure for table `promotion`
--

CREATE TABLE promotion (
  ID bigint(20) unsigned NOT NULL auto_increment,
  PromotionCode text,
  Active char(1) default NULL,
  BeginDate datetime default NULL,
  EndDate datetime default NULL,
  PromotionName text,
  Description text,
  ApplyTo text,
  MatchPaymentMethod text,
  MatchCustomerID text,
  MatchProductID text,
  MinItems int(11) default NULL,
  MinShipping decimal(10,2) unsigned default NULL,
  MinSubTotal decimal(10,2) unsigned default NULL,
  Type text,
  Value decimal(10,2) unsigned default NULL,
  PerCustomerLimit int(11) default NULL,
  MaximumDiscount decimal(10,2) default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY PromotionCodeActive (PromotionCode(20),Active)
) TYPE=MyISAM;

--
-- Table structure for table `review`
--

CREATE TABLE review (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ProductID text,
  CustomerID bigint(20) unsigned default NULL,
  Author text,
  Rating char(2) default NULL,
  ReviewText text,
  TimesRead bigint(20) default NULL,
  TimesHelpful bigint(20) default NULL,
  DateCreated datetime default NULL,
  Publish char(1) default NULL,
  PRIMARY KEY  (ID),
  KEY ProductIDPublish (ProductID(20),Publish)
) TYPE=MyISAM;

--
-- Table structure for table `shoppinglist`
--

CREATE TABLE shoppinglist (
  ID bigint(20) unsigned NOT NULL auto_increment,
  ListName varchar(80) default NULL,
  CustomerID bigint(20) unsigned default NULL,
  ProductID text,
  ProductName text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  Quantity int(11) default NULL,
  Attributes char(2) default NULL,
  Attribute1 text,
  Attribute2 text,
  Attribute3 text,
  Attribute4 text,
  Attribute5 text,
  Attribute6 text,
  Attribute7 text,
  Attribute8 text,
  Attribute9 text,
  Attribute10 text,
  Attribute11 text,
  Attribute12 text,
  Attribute13 text,
  Attribute14 text,
  Attribute15 text,
  Attribute16 text,
  Attribute17 text,
  Attribute18 text,
  Attribute19 text,
  Attribute20 text,
  Attribute21 text,
  Attribute22 text,
  Attribute23 text,
  Attribute24 text,
  Attribute25 text,
  Attribute26 text,
  Attribute27 text,
  Attribute28 text,
  Attribute29 text,
  Attribute30 text,
  PRIMARY KEY  (ID),
  KEY CustomerIDListName (CustomerID,ListName(20))
) TYPE=MyISAM;

--
-- Table structure for table `staticsearchpages`
--

CREATE TABLE staticsearchpages (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Active char(1) default NULL,
  ProfileName text,
  ProfileDescription text,
  FilePath text,
  FileName text,
  PageTitle text,
  MetaKeywords text,
  MetaDescription text,
  TopTemplateFilePath text,
  TopTemplateFileName text,
  BottomTemplateFilePath text,
  BottomTemplateFileName text,
  TemplateFilePath text,
  TemplateFileName text,
  ProductGroupDescription text,
  ComplementaryProductIDs text,
  LogicalOperator char(3) default NULL,
  SortField text,
  SortOrder char(1) default NULL,
  MaxRecords int(8) unsigned default NULL,
  ProductNameLogicalOperator char(3) default NULL,
  ProductName text,
  ProductNameCriteriaDelimiter char(1) default NULL,
  ProductNameSearchOperator char(3) default NULL,
  DepartmentSearchOperator char(3) default NULL,
  Department text,
  DepartmentCriteriaDelimiter char(1) default NULL,
  DepartmentLogicalOperator char(3) default NULL,
  CategorySearchOperator char(3) default NULL,
  Category text,
  CategoryCriteriaDelimiter char(1) default NULL,
  CategoryLogicalOperator char(3) default NULL,
  SubCategorySearchOperator char(3) default NULL,
  SubCategory text,
  SubCategoryCriteriaDelimiter char(1) default NULL,
  SubCategoryLogicalOperator char(3) default NULL,
  SubCategory2SearchOperator char(3) default NULL,
  SubCategory2 text,
  SubCategory2CriteriaDelimiter char(1) default NULL,
  SubCategory2LogicalOperator char(3) default NULL,
  SubCategory3LogicalOperator char(3) default NULL,
  SubCategory3 text,
  SubCategory3CriteriaDelimiter char(1) default NULL,
  SubCategory3SearchOperator char(3) default NULL,
  ManufacturerSearchOperator char(3) default NULL,
  Manufacturer text,
  ManufacturerCriteriaDelimiter char(1) default NULL,
  ManufacturerLogicalOperator char(3) default NULL,
  PriceLowerSearchOperator char(3) default NULL,
  PriceLower decimal(10,2) unsigned default NULL,
  PriceLowerCriteriaDelimiter char(1) default NULL,
  PriceLowerLogicalOperator char(3) default NULL,
  PriceUpperSearchOperator char(3) default NULL,
  PriceUpper decimal(10,2) unsigned default NULL,
  PriceUpperCriteriaDelimiter char(1) default NULL,
  PriceUpperLogicalOperator char(3) default NULL,
  BriefDescriptionSearchOperator char(3) default NULL,
  BriefDescription text,
  BriefDescriptionCriteriaDelimiter char(1) default NULL,
  BriefDescriptionLogicalOperator char(3) default NULL,
  DescriptionSearchOperator char(3) default NULL,
  Description text,
  DescriptionCriteriaDelimiter char(1) default NULL,
  DescriptionLogicalOperator char(3) default NULL,
  DateLastGenerated datetime default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Table structure for table `supplier`
--

CREATE TABLE supplier (
  ID bigint(20) unsigned NOT NULL auto_increment,
  Status char(1) default NULL,
  FirstName text,
  LastName text,
  Company text,
  Address1 text,
  Address2 text,
  City text,
  State text,
  Postal text,
  Country text,
  Phone text,
  Fax text,
  Email text,
  URL text,
  Password text,
  AllowLogin char(1) default NULL,
  NotifyEmail text,
  NotifyEmailTemplate text,
  SupplierAdminTemplate text,
  CustomerEmailTemplate text,
  StoreEmailTemplate text,
  StoreEmailAddress text,
  OrderQuantity int(11) unsigned default NULL,
  OrderTotal decimal(15,2) default NULL,
  AdminComments text,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  PRIMARY KEY  (ID),
  KEY EmailPassword (Email(20),Password(8))
) TYPE=MyISAM;

--
-- Table structure for table `wishlist`
--

CREATE TABLE wishlist (
  ID bigint(20) unsigned NOT NULL auto_increment,
  CustomerID bigint(20) unsigned default NULL,
  ProductID text,
  ProductName text,
  PurchaserID bigint(20) unsigned default NULL,
  DateCreated datetime default NULL,
  DateModified datetime default NULL,
  Attributes char(2) default NULL,
  Attribute1 text,
  Attribute2 text,
  Attribute3 text,
  Attribute4 text,
  Attribute5 text,
  Attribute6 text,
  Attribute7 text,
  Attribute8 text,
  Attribute9 text,
  Attribute10 text,
  Attribute11 text,
  Attribute12 text,
  Attribute13 text,
  Attribute14 text,
  Attribute15 text,
  Attribute16 text,
  Attribute17 text,
  Attribute18 text,
  Attribute19 text,
  Attribute20 text,
  Attribute21 text,
  Attribute22 text,
  Attribute23 text,
  Attribute24 text,
  Attribute25 text,
  Attribute26 text,
  Attribute27 text,
  Attribute28 text,
  Attribute29 text,
  Attribute30 text,
  PRIMARY KEY  (ID),
  KEY CustomerIDProductID (CustomerID,ProductID(20))
) TYPE=MyISAM;

