40014 SET OLD_FOREIGN_KEY_CHEC KS FOREIGN_KEY_CHECKS FOREIGN_KEY_CHECK

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;*/
CREATE DATABASE `testwork` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `testWork`;
CREATE TABLE `hotels` (
`hotel_id` int(10) NOT NULL auto_increment,
`title` varchar(140) default NULL,
`stars` int(1) default NULL,
`adress` varchar(140) default NULL,
PRIMARY KEY (`hotel_id`),
UNIQUE KEY `hotel_id` (`hotel_id`),
KEY `hotel_id_2` (`hotel_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
CREATE TABLE `hotels_description` (
`hotel_id` int(10) default NULL,
`language` int(1) default NULL,
`description` text,
KEY `description_id_2` (`hotel_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `hotels_facilities` (
`hotel_id` int(10) default NULL,
`facility_id` int(10) default NULL,
KEY `hotel_id` (`hotel_id`,`facility_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `hotels_facilities_list` (
`facility_id` int(10) default NULL,
`name` varchar(100) default NULL,
KEY `facility_id` (`facility_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `hotels_images` (
`hotel_id` int(10) NOT NULL default '0',
`image_url` varchar(140) default NULL,
KEY `hotel_id` (`hotel_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;