DROP TABLE IF EXISTS album_data, configure, contact, customer, events, eventnumber, gallery, login, orders, orderitems, orderimages, packagingtype, photographers, phone, photonumber, productoptions, productpackages, productpackageitems, productprice, products, requests, staff, teamphoto, teams, time, texts;

CREATE TABLE `album_data` (
  `GalleryId` int(7) NOT NULL,
  `album` varchar(5) NOT NULL,
  `photo` varchar(6) NOT NULL,
  `suffix` varchar(3) NOT NULL,
  `path` varchar(125) NOT NULL,
  UNIQUE KEY `GalleryId` (`GalleryId`,`album`,`photo`,`suffix`,`path`),
  KEY `photo` (`photo`),
  KEY `album` (`GalleryId`,`album`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `configure` (
  `GalleryId` int(7) NOT NULL,
  `Event` varchar(30) NOT NULL,
  `Gallery` varchar(20) NOT NULL,
  `ProductGroup` varchar(5) NOT NULL,
  `Expiration` varchar(10) NOT NULL,
  `DateStart` date NOT NULL,
  `DateEnd` date NOT NULL,
  `FulfillInteract` varchar(12) NOT NULL,
  `FulfillPickup` varchar(12) NOT NULL,
  `FulfillMail` varchar(12) NOT NULL,
  `Section1` varchar(15) NOT NULL,
  `Section2` varchar(15) NOT NULL,
  `Section3` varchar(15) NOT NULL,
  `Section4` varchar(15) NOT NULL,
  `Section5` varchar(15) NOT NULL,
  `Section6` varchar(15) NOT NULL,
  `Section7` varchar(15) NOT NULL,
  `Section8` varchar(15) NOT NULL,
  `Section9` varchar(15) NOT NULL,
  `Section10` varchar(15) NOT NULL,
  `Section11` varchar(15) NOT NULL,
  `Division1` varchar(15) NOT NULL,
  `Division2` varchar(15) NOT NULL,
  `Division3` varchar(15) NOT NULL,
  `Division4` varchar(15) NOT NULL,
  `Division5` varchar(15) NOT NULL,
  `Division6` varchar(15) NOT NULL,
  `Division7` varchar(15) NOT NULL,
  `Division8` varchar(15) NOT NULL,
  `Division9` varchar(15) NOT NULL,
  `Division10` varchar(15) NOT NULL,
  `Division11` varchar(15) NOT NULL,
  `ActionStart` varchar(4) NOT NULL,
  `ActionEnd` varchar(4) NOT NULL,
  `ActionInterval` varchar(2) NOT NULL,
  `TeamStart` varchar(4) NOT NULL,
  `TeamEnd` varchar(4) NOT NULL,
  `TeamInterval` varchar(2) NOT NULL,
  `TimeZone` varchar(12) NOT NULL,
  `RegPhotos` varchar(1) NOT NULL DEFAULT '',
  `SillyPhotos` varchar(1) NOT NULL DEFAULT '',
  `Internet` varchar(3) NOT NULL,
  `SyncInternet` int(1) NOT NULL,
  `PhotographerNum` varchar(2) NOT NULL,
  `Photographer1` varchar(3) NOT NULL,
  `Photographer2` varchar(3) DEFAULT NULL,
  `Photographer3` varchar(3) DEFAULT NULL,
  `Photographer4` varchar(3) DEFAULT NULL,
  `Photographer5` varchar(3) DEFAULT NULL,
  `Photographer6` varchar(3) DEFAULT NULL,
  `Photographer7` varchar(3) DEFAULT NULL,
  `Photographer8` varchar(3) DEFAULT NULL,
  `Photographer9` varchar(3) NOT NULL,
  `Photographer10` varchar(3) NOT NULL,
  `Photographer11` varchar(3) NOT NULL DEFAULT '',
  `Photographer12` varchar(3) NOT NULL DEFAULT '',
  `Photographer13` varchar(3) NOT NULL DEFAULT '',
  `Photographer14` varchar(3) NOT NULL DEFAULT '',
  `Photographer15` varchar(3) NOT NULL DEFAULT '',
  `Folder1A` varchar(20) DEFAULT NULL,
  `Folder1B` char(20) NOT NULL,
  `Folder2A` varchar(20) DEFAULT NULL,
  `Folder2B` char(20) NOT NULL,
  `Folder3A` varchar(20) DEFAULT NULL,
  `Folder3B` char(20) NOT NULL,
  `Folder4A` varchar(20) NOT NULL,
  `Folder4B` varchar(20) NOT NULL,
  `MinimumFileSize` varchar(10) NOT NULL,
  `MovieExtensions` varchar(20) NOT NULL,
  `Files` varchar(20) NOT NULL,
  `ViewFiles` varchar(50) NOT NULL,
  `AlbumFiles` varchar(20) NOT NULL,
  `CDBurnerSales` varchar(3) NOT NULL,
  `CDBurnerServer` varchar(3) NOT NULL,
  `GalleryRoot` varchar(45) NOT NULL,
  `ViewRoot` varchar(45) NOT NULL,
  `AlbumRoot` varchar(45) NOT NULL,
  `BackRoot` varchar(40) NOT NULL,
  `InternetRoot` varchar(40) NOT NULL,
  `OrderPath` varchar(60) NOT NULL,
  `HostType` varchar(1) NOT NULL,
  `OrderType` varchar(10) NOT NULL,
  `VSSPresent` varchar(1) NOT NULL,
  `SlidePath` varchar(15) NOT NULL,
  `ThumbPath` varchar(15) NOT NULL,
  `MasterPath` varchar(15) NOT NULL,
  `AlbumPath` varchar(15) NOT NULL,
  `TeamMasterPath` varchar(60) NOT NULL,
  `TeamPath` varchar(80) NOT NULL,
  `ViewPath` varchar(15) NOT NULL,
  `MoviePath` varchar(15) NOT NULL,
  `DBPath` varchar(10) NOT NULL,
  `LocalWebURL` varchar(35) NOT NULL,
  `VSSWebURL` varchar(40) NOT NULL,
  `InternetWebURL` varchar(50) NOT NULL,
  `CallBackURL` varchar(50) NOT NULL,
  `EventSchedule` varchar(200) NOT NULL,
  `TextNumber` varchar(15) NOT NULL,
  `CourtOrderType` varchar(10) NOT NULL,
  `CourtOrder` varchar(1000) NOT NULL,
  PRIMARY KEY (`GalleryId`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

;

CREATE TABLE `customer` (
  `Id` int(7) NOT NULL AUTO_INCREMENT,
  `LastName` varchar(30) NOT NULL,
  `FirstName` varchar(30) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `Cell` varchar(12) NOT NULL,
  `Text` varchar(12) NOT NULL,
  `ShipStreet1` varchar(30) NOT NULL,
  `ShipStreet2` varchar(30) NOT NULL,
  `ShipCity` varchar(30) NOT NULL,
  `ShipState` varchar(30) NOT NULL,
  `ShipZip` varchar(15) NOT NULL,
  `ShipCountry` varchar(30) NOT NULL,
  `ShipPhone` varchar(12) NOT NULL,
  `Password` varchar(30) NOT NULL,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `LastName` (`LastName`,`FirstName`,`Email`)
) ENGINE=MyISAM AUTO_INCREMENT=6427 DEFAULT CHARSET=utf8;

CREATE TABLE `events` (
  `GalleryId` int(7) NOT NULL,
  `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `IdAlias` int(11) NOT NULL,
  `Age` varchar(15) NOT NULL,
  `Name` text NOT NULL,
  `Team` varchar(45) NOT NULL,
  `Court` int(11) NOT NULL,
  `Time` varchar(4) NOT NULL,
  `Minute` varchar(2) NOT NULL,
  `Date` date NOT NULL,
  `Uploaded` varchar(20) DEFAULT NULL,
  `Photographer` varchar(3) DEFAULT NULL,
  `PhotoCount` int(4) DEFAULT NULL,
  UNIQUE KEY `GalleryId-Id` (`GalleryId`,`Id`),
  KEY `Id` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8;

CREATE TABLE `eventnumber` (
  `GalleryId` int(7) NOT NULL,
  `Id` int(7) NOT NULL,
  UNIQUE KEY `GalleryId` (`GalleryId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `gallery` (
  `GalleryId` int(7) NOT NULL,
  UNIQUE KEY `GalleryId` (`GalleryId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `login` (
  `GalleryId` int(7) NOT NULL,
  `Id` varchar(5) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `Hint` varchar(80) NOT NULL,
  `OrderSeq` varchar(1) NOT NULL,
  PRIMARY KEY (`GalleryId`,`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `orders` (
  `Type` varchar(10) NOT NULL DEFAULT '',
  `GalleryId` int(7) NOT NULL,
  `Album` varchar(5) NOT NULL,
  `Email` varchar(50) NOT NULL DEFAULT '',
  `Text` varchar(12) NOT NULL DEFAULT '',
  `Fulfillment` varchar(1) NOT NULL,
  `ShipFirst` varchar(30) NOT NULL DEFAULT '',
  `ShipLast` varchar(30) NOT NULL DEFAULT '',
  `ShipCompany` varchar(30) NOT NULL DEFAULT '',
  `ShipStreet1` varchar(30) NOT NULL DEFAULT '',
  `ShipStreet2` varchar(30) NOT NULL DEFAULT '',
  `ShipCity` varchar(30) NOT NULL DEFAULT '',
  `ShipState` varchar(30) NOT NULL DEFAULT '',
  `ShipZip` varchar(10) NOT NULL DEFAULT '',
  `ShipCountry` varchar(30) NOT NULL DEFAULT '',
  `ShipPhone` varchar(12) NOT NULL DEFAULT '',
  `ShipMethod` varchar(30) NOT NULL DEFAULT '',
  `Amount` decimal(7,2) NOT NULL DEFAULT '0.00',
  `Savings` decimal(7,2) NOT NULL DEFAULT '0.00',
  `ServiceFee` decimal(7,2) NOT NULL DEFAULT '0.00',
  `Tax` decimal(7,2) NOT NULL DEFAULT '0.00',
  `Shipping` decimal(7,2) NOT NULL DEFAULT '0.00',
  `Total` decimal(7,2) NOT NULL DEFAULT '0.00',
  `Paid` varchar(1) NOT NULL DEFAULT '',
  `PayerStatus` varchar(12) NOT NULL DEFAULT '',
  `PaymentType` varchar(10) NOT NULL DEFAULT '',
  `PaymentReference` varchar(30) NOT NULL DEFAULT '',
  `PaymentStatus` varchar(20) NOT NULL DEFAULT '',
  `PaymentReasonCode` varchar(20) NOT NULL DEFAULT '',
  `PaymentPendingReason` varchar(20) NOT NULL DEFAULT '',
  `PaymentAuthAmount` varchar(10) NOT NULL DEFAULT '',
  `PaymentAuthId` varchar(20) NOT NULL DEFAULT '',
  `PaymentAuthStatus` varchar(20) NOT NULL DEFAULT '',
  `PaymentGross` varchar(10) NOT NULL DEFAULT '',
  `PaymentFee` varchar(10) NOT NULL DEFAULT '',
  `PaymentAmount` varchar(10) NOT NULL DEFAULT '',
  `PaymentDate` varchar(25) NOT NULL DEFAULT '',
  `PaymentMemo` varchar(200) NOT NULL DEFAULT '',
  `OrderDate` datetime NOT NULL,
  `OrderStatusChanged` datetime NOT NULL,
  `OrderStatus` varchar(10) NOT NULL DEFAULT '',
  `Notes` varchar(30) NOT NULL DEFAULT '',
  PRIMARY KEY (`GalleryId`,`Album`,`Type`),
  KEY `Date-Ordered` (`OrderDate`),
  KEY `Notes` (`Notes`),
  KEY `Notes_2` (`Notes`),
  KEY `Savings` (`Savings`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `orderitems` (
  `GalleryId` int(7) NOT NULL,
  `Album` varchar(5) NOT NULL,
  `ItemId` int(3) NOT NULL DEFAULT '0',
  `PackageId` int(3) NOT NULL DEFAULT '0',
  `ItemCode` varchar(10) NOT NULL DEFAULT '',
  `ItemDescription` varchar(30) NOT NULL DEFAULT '',
  `Option1` varchar(30) NOT NULL DEFAULT '',
  `Option1Prompt` varchar(20) NOT NULL DEFAULT '',
  `Option2` varchar(20) NOT NULL DEFAULT '',
  `Option2Prompt` varchar(20) NOT NULL DEFAULT '',
  `Option3` varchar(20) NOT NULL DEFAULT '',
  `Option3Prompt` varchar(20) NOT NULL DEFAULT '',
  `Qty` int(4) NOT NULL DEFAULT '0',
  `Cost` float(7,2) NOT NULL DEFAULT '0.00',
  `Savings` float(7,2) NOT NULL DEFAULT '0.00',
  `PackagingTypeComputed` varchar(25) NOT NULL DEFAULT '',
  `TrackingType` varchar(5) NOT NULL DEFAULT '',
  `TrackingId` varchar(25) NOT NULL DEFAULT '',
  `TransactionId` varchar(50) NOT NULL DEFAULT '',
  `ItemStatus` varchar(15) NOT NULL DEFAULT '',
  `ItemStatusChanged` date NOT NULL,
  `Type` varchar(2) NOT NULL DEFAULT '',
  PRIMARY KEY (`GalleryId`,`Album`,`Type`,`ItemId`,`PackageId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `orderimages` (
  `GalleryId` int(7) NOT NULL,
  `Album` varchar(5) NOT NULL,
  `ItemId` int(3) NOT NULL,
  `PackageId` int(3) NOT NULL,
  `ImageId` int(4) NOT NULL,
  `Qualifier` varchar(20) NOT NULL,
  `Path` varchar(75) NOT NULL,
  `File` varchar(12) NOT NULL,
  `Suffix` varchar(3) NOT NULL,
  `Type` varchar(2) NOT NULL,
  PRIMARY KEY (`GalleryId`,`Album`,`Type`,`ItemId`,`PackageId`,`ImageId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `packagingtype` (
  `PackagingType` varchar(20) NOT NULL,
  `PackagingStyle` varchar(10) NOT NULL,
  `ShipVendor` varchar(6) NOT NULL,
  `Length` int(3) NOT NULL,
  `Width` int(3) NOT NULL,
  `Height` int(3) NOT NULL,
  `PackageWeight` decimal(5,2) NOT NULL,
  `MaxQty` int(3) NOT NULL,
  UNIQUE KEY `PackingStyle` (`PackagingType`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `photographers` (
  `GalleryId` int(7) NOT NULL,
  `Date` date NOT NULL,
  `Time` varchar(4) NOT NULL,
  `Available` int(1) NOT NULL,
  `CourtsPerHour` int(11) NOT NULL,
  `PlayersPerCourt` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `phone` (
  `GalleryId` int(7) NOT NULL,
  `Type` char(1) NOT NULL,
  `Emailed` varchar(10) NOT NULL DEFAULT '',
  `Name` varchar(20) NOT NULL,
  `Phone` varchar(12) NOT NULL,
  `Email` varchar(40) NOT NULL,
  `OptIn` varchar(1) NOT NULL DEFAULT 'Y',
  UNIQUE KEY `phoneindex` (`GalleryId`,`Phone`,`Name`,`Email`,`Type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `photonumber` (
  `GalleryId` int(7) NOT NULL,
  `photonumber` varchar(6) NOT NULL,
  PRIMARY KEY (`GalleryId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `productoptions` (
  `ProductGroup` varchar(5) NOT NULL,
  `Code` varchar(3) NOT NULL,
  `OptionId` int(3) NOT NULL,
  `ListId` int(3) NOT NULL,
  `Name` varchar(45) NOT NULL,
  `OptionType` varchar(3) NOT NULL,
  `Price` int(3) NOT NULL,
  `Savings` int(3) NOT NULL,
  `Qty` int(3) NOT NULL,
  `Weight` decimal(4,1) NOT NULL,
  `OptionPackagingType` char(20) NOT NULL,
  UNIQUE KEY `ProductOptionsIndex` (`ProductGroup`,`Code`,`OptionId`,`ListId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `productpackageitems` (
  `ProductGroup` varchar(5) NOT NULL,
  `Package` varchar(10) NOT NULL,
  `PackageId` int(3) NOT NULL,
  `ImageId` int(3) NOT NULL,
  `ItemCode` varchar(1) NOT NULL,
  `Qualifier` varchar(16) NOT NULL,
  `Qty` int(3) NOT NULL,
  PRIMARY KEY (`ProductGroup`,`Package`,`PackageId`,`ImageId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `productpackages` (
  `ProductGroup` varchar(5) NOT NULL,
  `Package` varchar(10) NOT NULL,
  `Description` varchar(40) NOT NULL,
  `Price` decimal(7,2) NOT NULL,
  `Shipping` decimal(7,2) NOT NULL,
  `Savings` decimal(7,2) NOT NULL,
  UNIQUE KEY `ProductGroupPackage` (`ProductGroup`,`Package`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `productprice` (
  `ProductGroup` varchar(5) NOT NULL,
  `Code` varchar(1) NOT NULL,
  `Id` int(3) NOT NULL,
  `Qty` int(3) NOT NULL,
  `Price` varchar(10) NOT NULL,
  UNIQUE KEY `ProductGroupCode` (`ProductGroup`,`Code`,`Qty`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `products` (
  `ProductGroup` varchar(5) NOT NULL,
  `Code` varchar(3) NOT NULL,
  `Description` varchar(60) NOT NULL,
  `ProductType` varchar(1) NOT NULL,
  `ProductImageCount` int(3) NOT NULL,
  `Pickup` varchar(1) NOT NULL,
  `ProductProduction` varchar(10) NOT NULL,
  `ProductEquipment` varchar(10) NOT NULL,
  `Price` varchar(10) NOT NULL,
  `Weight` decimal(4,1) NOT NULL,
  `WeightAnyQty` decimal(4,1) NOT NULL,
  `Length` int(2) NOT NULL,
  `Width` int(2) NOT NULL,
  `Height` int(3) NOT NULL,
  `PackagingLoc` varchar(20) NOT NULL,
  `PackagingType` varchar(25) NOT NULL,
  `PackagingType2` varchar(25) NOT NULL,
  `PackagingType3` varchar(25) NOT NULL,
  `PackagingType4` varchar(25) NOT NULL,
  `PackagingType5` varchar(25) NOT NULL,
  PRIMARY KEY (`ProductGroup`,`Code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `requests` (
  `GalleryId` int(7) NOT NULL,
  `Event` int(10) unsigned NOT NULL,
  `Date` varchar(10) NOT NULL,
  `Time` varchar(4) NOT NULL,
  `Minute` varchar(2) NOT NULL,
  `Court` int(11) NOT NULL,
  `Team` varchar(40) NOT NULL,
  `Color` varchar(20) NOT NULL,
  `Uniform` varchar(3) NOT NULL,
  `Notes` varchar(30) NOT NULL,
  `Album` varchar(5) NOT NULL,
  `Age` varchar(15) NOT NULL,
  `StandBy` char(1) NOT NULL,
  `Requestor` varchar(25) NOT NULL,
  `TextNumber` varchar(12) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `Product` varchar(30) NOT NULL,
  PRIMARY KEY (`GalleryId`,`Date`,`Time`,`Minute`,`Court`,`Age`,`Team`,`Uniform`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `staff` (
  `Id` int(11) NOT NULL AUTO_INCREMENT,
  `GalleryId` int(11) NOT NULL,
  `LastName` varchar(30) NOT NULL,
  `FirstName` varchar(30) NOT NULL,
  `Type` varchar(1) NOT NULL,
  `Street1` varchar(30) NOT NULL,
  `Street2` varchar(30) NOT NULL,
  `City` varchar(30) NOT NULL,
  `State` varchar(30) NOT NULL,
  `Zip` varchar(10) NOT NULL,
  `Country` varchar(30) NOT NULL,
  `Email` varchar(60) NOT NULL,
  `Phone` varchar(12) NOT NULL,
  `SSnumber` varchar(11) NOT NULL,
  `Rate` decimal(7,2) NOT NULL,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `LastName_3` (`GalleryId`,`LastName`,`FirstName`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;

CREATE TABLE `teamphoto` (
  `GalleryId` int(7) NOT NULL,
  `Team` varchar(35) NOT NULL,
  `Age` varchar(15) NOT NULL,
  `Date` varchar(10) NOT NULL,
  `Time` varchar(4) NOT NULL,
  `Hour` varchar(4) NOT NULL DEFAULT '',
  `Minute` varchar(2) NOT NULL,
  `PhotoStart` varchar(7) DEFAULT NULL,
  `PhotoEnd` varchar(7) DEFAULT NULL,
  `PhotoNumber` varchar(6) NOT NULL,
  `PhotoSilly` varchar(7) DEFAULT NULL,
  `PickupBy` varchar(15) DEFAULT NULL,
  `Place` char(1) NOT NULL DEFAULT '',
  `Bracket` varchar(20) NOT NULL,
  `Requestor` varchar(25) NOT NULL DEFAULT '',
  `TextNumber` varchar(12) NOT NULL DEFAULT '',
  `Email` varchar(100) NOT NULL DEFAULT '',
  `Id` int(11) NOT NULL,
  PRIMARY KEY (`GalleryId`,`Id`) USING BTREE,
  KEY `teamphotostart` (`PhotoStart`),
  KEY `teamphotoend` (`PhotoEnd`),
  KEY `GalleryId` (`GalleryId`,`Team`,`Age`,`Bracket`,`Place`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `teams` (
  `GalleryId` int(7) NOT NULL,
  `Team` varchar(30) NOT NULL,
  `Age` varchar(15) NOT NULL,
  PRIMARY KEY (`GalleryId`,`Team`,`Age`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `time` (
  `Id` int(7) NOT NULL AUTO_INCREMENT,
  `GalleryId` int(7) NOT NULL,
  `StaffId` int(7) NOT NULL,
  `Date` varchar(12) NOT NULL,
  `StartHour` varchar(4) NOT NULL,
  `StartMinute` varchar(2) NOT NULL,
  `EndHour` varchar(4) NOT NULL,
  `EndMinute` varchar(2) NOT NULL,
  `Hours` float(5,2) NOT NULL,
  PRIMARY KEY (`Id`),
  UNIQUE KEY `GalleryID` (`GalleryId`,`StaffId`,`Date`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

CREATE TABLE `texts` (
  `GalleryId` int(7) NOT NULL,
  `Id` int(8) NOT NULL AUTO_INCREMENT,
  `Type` varchar(1) NOT NULL,
  `Date` varchar(12) NOT NULL,
  `Time` varchar(10) NOT NULL,
  `Phone` varchar(12) NOT NULL,
  `Message` varchar(10000) NOT NULL,
  `Status` text NOT NULL,
  KEY `Id` (`Id`) USING BTREE,
  KEY `GalleryId-Id` (`GalleryId`,`Id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=66752 DEFAULT CHARSET=latin1;

