This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
download_example_schema [2012/12/31 12:11] cruisefactory |
download_example_schema [2014/09/02 14:07] (current) cruisefactory |
||
---|---|---|---|
Line 2: | Line 2: | ||
Provided here is an example structure for a MySQL database to help with easily importing the XML data from our system to yours. By using this example schema you will quickly have a database up and running that can facilitate all neccessary tables & fields from the Cruise Factory XML service. | Provided here is an example structure for a MySQL database to help with easily importing the XML data from our system to yours. By using this example schema you will quickly have a database up and running that can facilitate all neccessary tables & fields from the Cruise Factory XML service. | ||
- | [[http:// | + | Click the link at the top of the example below to download the file. |
+ | |||
+ | <file sql mysql-database-example.sql> | ||
+ | # ************************************************************ | ||
+ | # Database: cruisefactory | ||
+ | # ************************************************************ | ||
+ | |||
+ | |||
+ | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
+ | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
+ | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
+ | /*!40101 SET NAMES utf8 */; | ||
+ | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, | ||
+ | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, | ||
+ | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, | ||
+ | |||
+ | |||
+ | # Dump of table amenities | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `amenities`; | ||
+ | |||
+ | CREATE TABLE `amenities` | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `ship_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(150) NOT NULL DEFAULT '', | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `AmenitiesIndex` (`id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table cabins | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `cabins`; | ||
+ | |||
+ | CREATE TABLE `cabins` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `ship_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text, | ||
+ | `image` varchar(150) DEFAULT NULL, | ||
+ | `photo` varchar(150) DEFAULT NULL, | ||
+ | `cabin_order` int(11) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `CabinsIndex` (`id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table cruiselines | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `cruiselines`; | ||
+ | |||
+ | CREATE TABLE `cruiselines` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `name` varchar(200) NOT NULL DEFAULT '', | ||
+ | `location` varchar(200) NOT NULL DEFAULT '', | ||
+ | `booking_email` varchar(100) DEFAULT NULL, | ||
+ | `brief_desc` varchar(200) NOT NULL DEFAULT '', | ||
+ | `company_bio` text NOT NULL, | ||
+ | `logodata` longblob, | ||
+ | `logosize` varchar(50) DEFAULT NULL, | ||
+ | `logotype` varchar(50) DEFAULT NULL, | ||
+ | `url` varchar(255) DEFAULT NULL, | ||
+ | `video_url` varchar(255) DEFAULT NULL, | ||
+ | `starrating` int(11) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table cruises | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `cruises`; | ||
+ | |||
+ | CREATE TABLE `cruises` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `destination_id` int(11) NOT NULL DEFAULT ' | ||
+ | `ship_id` int(11) NOT NULL DEFAULT ' | ||
+ | `cruisetype_id` smallint(6) NOT NULL DEFAULT ' | ||
+ | `length` smallint(6) DEFAULT NULL, | ||
+ | `name` varchar(80) NOT NULL DEFAULT '', | ||
+ | `brief_description` varchar(250) DEFAULT NULL, | ||
+ | `description` text, | ||
+ | `photo` varchar(100) DEFAULT NULL, | ||
+ | `start_price` decimal(9, | ||
+ | `currency_id` int(11) NOT NULL DEFAULT ' | ||
+ | `cruise_order` int(11) NOT NULL DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`), | ||
+ | KEY `destination_id` (`destination_id`), | ||
+ | KEY `ship_id` (`ship_id`), | ||
+ | KEY `cruisetype_id` (`cruisetype_id`), | ||
+ | KEY `CruisesIndex` (`cruiseline_id`, | ||
+ | KEY `destination_id_id` (`destination_id`, | ||
+ | KEY `id_cruiselineid` (`id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table cruisetypes | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `cruisetypes`; | ||
+ | |||
+ | CREATE TABLE `cruisetypes` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table currencies | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `currencies`; | ||
+ | |||
+ | CREATE TABLE `currencies` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `name` varchar(50) NOT NULL DEFAULT '', | ||
+ | `description` varchar(48) DEFAULT NULL, | ||
+ | `sign` varchar(11) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table deckplans | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `deckplans`; | ||
+ | |||
+ | CREATE TABLE `deckplans` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `ship_id` int(11) NOT NULL DEFAULT ' | ||
+ | `level` varchar(100) NOT NULL DEFAULT '', | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `image` varchar(100) NOT NULL DEFAULT '', | ||
+ | `colorcode` varchar(100) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `ship_id` (`ship_id`), | ||
+ | KEY `DeckPlansIndex` (`id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table destinations | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `destinations`; | ||
+ | |||
+ | CREATE TABLE `destinations` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text NOT NULL, | ||
+ | `image` varchar(100) DEFAULT NULL, | ||
+ | `banner` varchar(100) DEFAULT NULL, | ||
+ | `map_thumb` varchar(100) DEFAULT NULL, | ||
+ | `map_large` varchar(100) DEFAULT NULL, | ||
+ | `featured` char(1) NOT NULL DEFAULT ' | ||
+ | `featured_text` text, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `featured` (`featured`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table dining | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `dining`; | ||
+ | |||
+ | CREATE TABLE `dining` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) DEFAULT NULL, | ||
+ | `introduction` text NOT NULL, | ||
+ | `photo` varchar(50) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`), | ||
+ | KEY `DiningIndex` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table diningtimes | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `diningtimes`; | ||
+ | |||
+ | CREATE TABLE `diningtimes` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `meal` varchar(50) NOT NULL DEFAULT '', | ||
+ | `normal_sitting` varchar(50) DEFAULT NULL, | ||
+ | `late_sitting` varchar(50) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`), | ||
+ | KEY `DiningTimesIndex` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table facilities | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `facilities`; | ||
+ | |||
+ | CREATE TABLE `facilities` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `ship_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(150) NOT NULL DEFAULT '', | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `ship_id` (`ship_id`), | ||
+ | KEY `FacilitiesIndex` (`id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table specialsailingdates | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `specialsailingdates`; | ||
+ | |||
+ | CREATE TABLE `specialsailingdates` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `factory_id` int(11) NOT NULL DEFAULT ' | ||
+ | `special_id` int(11) DEFAULT NULL, | ||
+ | `sailingdate_id` int(11) NOT NULL DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `sailingdate_id` (`sailingdate_id`), | ||
+ | KEY `factory_id` (`factory_id`), | ||
+ | KEY `special_id` (`special_id`), | ||
+ | KEY `SDIndex` (`factory_id`, | ||
+ | KEY `sailingdateid_specialid_factoryid` (`factory_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table specials | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `specials`; | ||
+ | |||
+ | CREATE TABLE `specials` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruise_id` int(11) NOT NULL DEFAULT ' | ||
+ | `factory_id` int(11) NOT NULL DEFAULT ' | ||
+ | `priority_id` int(11) NOT NULL DEFAULT ' | ||
+ | `special_header` varchar(100) DEFAULT NULL, | ||
+ | `special_text` longtext, | ||
+ | `special_brief` longtext, | ||
+ | `instructions` longtext, | ||
+ | `booking_email` varchar(100) DEFAULT NULL, | ||
+ | `start_price` decimal(9, | ||
+ | `currency_id` int(11) NOT NULL DEFAULT ' | ||
+ | `cruise_order` int(11) NOT NULL DEFAULT ' | ||
+ | `main_special` char(1) DEFAULT ' | ||
+ | `dest_special` char(1) DEFAULT ' | ||
+ | `special_order` int(11) DEFAULT NULL, | ||
+ | `validity_date_end` date DEFAULT NULL, | ||
+ | `validity_date_start` date DEFAULT NULL, | ||
+ | `checked` char(1) DEFAULT ' | ||
+ | `internal_notes` text, | ||
+ | `advert_code` varchar(255) DEFAULT NULL, | ||
+ | `exchange_rate` double(11, | ||
+ | `ex_rate_date` date DEFAULT NULL, | ||
+ | `currency_id_ref` int(11) unsigned NOT NULL DEFAULT ' | ||
+ | `create_pdf` char(1) DEFAULT ' | ||
+ | `uploaded_pdf` varchar(255) DEFAULT NULL, | ||
+ | `withdrawn` char(1) NOT NULL DEFAULT ' | ||
+ | `quicksave` char(1) DEFAULT NULL, | ||
+ | `status` tinyint(1) unsigned NOT NULL DEFAULT ' | ||
+ | `type` varchar(32) DEFAULT NULL, | ||
+ | `escorted` char(1) DEFAULT ' | ||
+ | `wedding` char(1) DEFAULT ' | ||
+ | `agentonly` char(1) DEFAULT ' | ||
+ | `special_conditions` text, | ||
+ | `specialpdf_filename` varchar(255) DEFAULT NULL, | ||
+ | `specialpdf_contents` text, | ||
+ | `seniors` enum(' | ||
+ | `singles` enum(' | ||
+ | `ship_id` int(11) DEFAULT ' | ||
+ | `cruiseline_id` int(11) DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `FSIndex` (`cruise_id`, | ||
+ | KEY `FSDate` (`id`, | ||
+ | KEY `factory_id` (`factory_id`), | ||
+ | KEY `priority_id` (`priority_id`), | ||
+ | KEY `cruise_id` (`cruise_id`), | ||
+ | KEY `currency_id` (`currency_id`), | ||
+ | KEY `factoryid_cruiseid` (`cruise_id`, | ||
+ | KEY `factoryid_mainspecial_withdrawn_validitydates` (`factory_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table companionpricing | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `companionpricing`; | ||
+ | |||
+ | CREATE TABLE `companionpricing` ( | ||
+ | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `special_id` int(11) unsigned NOT NULL DEFAULT ' | ||
+ | `price_inside` double(9,2) DEFAULT '0.00', | ||
+ | `price_outside` double(9,2) DEFAULT ' | ||
+ | `price_balcony` double(9,2) DEFAULT ' | ||
+ | `price_suites` double(9,2) DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `FSLPIndex` (`id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table leadpricing | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `leadpricing`; | ||
+ | |||
+ | CREATE TABLE `leadpricing` ( | ||
+ | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `special_id` int(11) unsigned NOT NULL DEFAULT ' | ||
+ | `price_inside` double(9,2) DEFAULT ' | ||
+ | `price_outside` double(9,2) DEFAULT ' | ||
+ | `price_balcony` double(9,2) DEFAULT ' | ||
+ | `price_suites` double(9,2) DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `FSLPIndex` (`id`, | ||
+ | KEY `specialid` (`special_id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table specialsmultipricing | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `specialsmultipricing`; | ||
+ | |||
+ | CREATE TABLE `specialsmultipricing` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `special_id` int(11) DEFAULT NULL, | ||
+ | `sailingdate` date DEFAULT ' | ||
+ | `inside` varchar(16) DEFAULT NULL, | ||
+ | `outside` varchar(16) DEFAULT NULL, | ||
+ | `balcony` varchar(16) DEFAULT NULL, | ||
+ | `suite` varchar(16) DEFAULT NULL, | ||
+ | UNIQUE KEY `id` (`id`), | ||
+ | UNIQUE KEY `specialid_sailingdate` (`special_id`, | ||
+ | KEY `special_id` (`special_id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table specialitineraries | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `specialitineraries`; | ||
+ | |||
+ | CREATE TABLE `specialitineraries` ( | ||
+ | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `special_id` int(11) unsigned NOT NULL DEFAULT ' | ||
+ | `day` tinyint(3) NOT NULL DEFAULT ' | ||
+ | `activity` varchar(60) NOT NULL DEFAULT '', | ||
+ | `starttime` varchar(20) NOT NULL DEFAULT '', | ||
+ | `endtime` varchar(20) NOT NULL DEFAULT '', | ||
+ | `type` enum(' | ||
+ | `order` tinyint(3) NOT NULL DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `special_id` (`special_id`, | ||
+ | KEY `special_id_type` (`special_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table specialspricing | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `specialspricing`; | ||
+ | |||
+ | CREATE TABLE `specialspricing` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `factory_id` int(11) NOT NULL DEFAULT ' | ||
+ | `special_id` int(11) NOT NULL DEFAULT ' | ||
+ | `cruise_id` int(11) NOT NULL DEFAULT ' | ||
+ | `cabin_id` int(11) NOT NULL DEFAULT ' | ||
+ | `price` double(9,2) DEFAULT NULL, | ||
+ | `portcharges` char(1) NOT NULL DEFAULT ' | ||
+ | `currency_id` int(1) NOT NULL DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `FSPricingIndex` (`cabin_id`, | ||
+ | KEY `specialid` (`special_id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table itineraries | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `itineraries`; | ||
+ | |||
+ | CREATE TABLE `itineraries` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruise_id` int(11) NOT NULL DEFAULT ' | ||
+ | `day` int(11) DEFAULT NULL, | ||
+ | `port_id` int(11) NOT NULL DEFAULT ' | ||
+ | `arrive` varchar(50) DEFAULT NULL, | ||
+ | `depart` varchar(50) DEFAULT NULL, | ||
+ | `portorder` smallint(6) NOT NULL DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `ItineriesIndex` (`cruise_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table kidsschedules | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `kidsschedules`; | ||
+ | |||
+ | CREATE TABLE `kidsschedules` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table kidsprograms | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `kidsprograms`; | ||
+ | |||
+ | CREATE TABLE `kidsprograms` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text NOT NULL, | ||
+ | `photo` varchar(100) DEFAULT NULL, | ||
+ | `photo_order` int(11) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table menus | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `menus`; | ||
+ | |||
+ | CREATE TABLE `menus` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text NOT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table months | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `months`; | ||
+ | |||
+ | CREATE TABLE `months` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table latlong | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `latlong`; | ||
+ | |||
+ | CREATE TABLE `latlong` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `port_id` int(11) DEFAULT NULL, | ||
+ | `lat` float(10,6) DEFAULT NULL, | ||
+ | `long` float(10,6) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | UNIQUE KEY `uniqueport` (`port_id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table ports | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `ports`; | ||
+ | |||
+ | CREATE TABLE `ports` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `destination_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text NOT NULL, | ||
+ | `photo` varchar(100) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `PortsIndex` (`destination_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table priceguide | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `priceguide`; | ||
+ | |||
+ | CREATE TABLE `priceguide` ( | ||
+ | `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | ||
+ | `sailing_id` int(11) unsigned NOT NULL DEFAULT ' | ||
+ | `inside_cabin` float DEFAULT NULL, | ||
+ | `outside_cabin` float DEFAULT NULL, | ||
+ | `balcony` float DEFAULT NULL, | ||
+ | `suite` float DEFAULT NULL, | ||
+ | `exchange_rate` float DEFAULT NULL, | ||
+ | `last_update` date DEFAULT NULL, | ||
+ | `update_name` varchar(20) DEFAULT NULL, | ||
+ | `currency` varchar(12) DEFAULT NULL, | ||
+ | `factory_id` int(11) unsigned NOT NULL DEFAULT ' | ||
+ | `cruiseline_id` int(11) DEFAULT NULL, | ||
+ | `use_cl_currency` enum(' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `PGIndex` (`factory_id`, | ||
+ | KEY `sailingid_factoryid_cruiselineid` (`sailing_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table sailingdates | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `sailingdates`; | ||
+ | |||
+ | CREATE TABLE `sailingdates` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruise_id` int(11) NOT NULL DEFAULT ' | ||
+ | `sailingdate` date NOT NULL DEFAULT ' | ||
+ | `embarkport_id` int(11) NOT NULL DEFAULT ' | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `SDIndex` (`cruise_id`, | ||
+ | KEY `cruise_id` (`cruise_id`), | ||
+ | KEY `sailingdate` (`embarkport_id`), | ||
+ | KEY `cruise_id_sailingdate` (`cruise_id`, | ||
+ | KEY `sailingdate_only` (`sailingdate`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table seasons | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `seasons`; | ||
+ | |||
+ | CREATE TABLE `seasons` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `destination_id` int(11) NOT NULL DEFAULT ' | ||
+ | `start_month` int(11) NOT NULL DEFAULT ' | ||
+ | `end_month` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(50) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `SeasonsIndex` (`destination_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table shipphotos | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `shipphotos`; | ||
+ | |||
+ | CREATE TABLE `shipphotos` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `ship_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text, | ||
+ | `photo` varchar(100) NOT NULL DEFAULT '', | ||
+ | `photo_order` int(11) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `ship_id` (`ship_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table ships | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `ships`; | ||
+ | |||
+ | CREATE TABLE `ships` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(250) NOT NULL DEFAULT '', | ||
+ | `thumbnail` varchar(50) DEFAULT NULL, | ||
+ | `mainimage` varchar(50) DEFAULT NULL, | ||
+ | `maidenvoyage` varchar(100) DEFAULT NULL, | ||
+ | `refurbished` varchar(100) DEFAULT NULL, | ||
+ | `tonnage` varchar(50) DEFAULT NULL, | ||
+ | `length` varchar(50) DEFAULT NULL, | ||
+ | `beam` varchar(50) DEFAULT NULL, | ||
+ | `draft` varchar(50) DEFAULT NULL, | ||
+ | `speed` varchar(50) DEFAULT NULL, | ||
+ | `ship_rego` varchar(150) DEFAULT NULL, | ||
+ | `pass_capacity` varchar(50) DEFAULT NULL, | ||
+ | `pass_space` varchar(50) DEFAULT NULL, | ||
+ | `crew_size` varchar(50) DEFAULT NULL, | ||
+ | `nat_crew` varchar(100) DEFAULT NULL, | ||
+ | `nat_officers` varchar(100) DEFAULT NULL, | ||
+ | `nat_dining` varchar(100) DEFAULT NULL, | ||
+ | `description` text, | ||
+ | `starrating` int(11) DEFAULT NULL, | ||
+ | `cruisetype_id` tinyint(2) unsigned NOT NULL DEFAULT ' | ||
+ | `currency_id` int(11) unsigned DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `ShipsIndex` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table starrating | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `starrating`; | ||
+ | |||
+ | CREATE TABLE `starrating` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `rating` varchar(25) DEFAULT NULL, | ||
+ | `order` tinyint(4) DEFAULT NULL, | ||
+ | PRIMARY KEY (`id`) | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table tipping | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `tipping`; | ||
+ | |||
+ | CREATE TABLE `tipping` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text NOT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | # Dump of table winelists | ||
+ | # ------------------------------------------------------------ | ||
+ | |||
+ | DROP TABLE IF EXISTS `winelists`; | ||
+ | |||
+ | CREATE TABLE `winelists` ( | ||
+ | `id` int(11) NOT NULL AUTO_INCREMENT, | ||
+ | `cruiseline_id` int(11) NOT NULL DEFAULT ' | ||
+ | `name` varchar(100) NOT NULL DEFAULT '', | ||
+ | `description` text, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `cruiseline_id` (`cruiseline_id`, | ||
+ | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | ||
+ | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | ||
+ | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | ||
+ | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
+ | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
+ | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | ||
+ | </ |