-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcookbook_sql.php
35 lines (33 loc) · 1.25 KB
/
cookbook_sql.php
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
CREATE TABLE `cookbook_categories` (
`c_id` tinyint(3) NOT NULL AUTO_INCREMENT,
`c_thumbnail` text,
`c_name` varchar(255) NOT NULL,
`c_name_sef` varchar(255) NOT NULL default '',
PRIMARY KEY (`c_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;
CREATE TABLE `cookbook_recipes` (
`r_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`r_author` tinyint(3) unsigned NOT NULL,
`r_thumbnail` text,
`r_name` varchar(255) NOT NULL,
`r_name_sef` varchar(255) NOT NULL default '',
`r_datestamp` int(10) unsigned NOT NULL,
`r_category` tinyint(3) unsigned NOT NULL,
`r_keywords` varchar(255) DEFAULT NULL,
`r_persons` tinyint(3) DEFAULT NULL,
`r_activetime` int(3) DEFAULT NULL,
`r_totaltime` int(3) DEFAULT NULL,
`r_authorrating` int(3) DEFAULT NULL,
`r_difficulty` tinyint(3) DEFAULT NULL,
`r_summary` text,
`r_ingredients` text NOT NULL,
`r_instructions` text NOT NULL,
PRIMARY KEY (r_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;
CREATE TABLE `cookbook_bookmarks` (
`bookmark_id` tinyint(3) NOT NULL AUTO_INCREMENT,
`user_id` tinyint(3) NOT NULL,
`recipe_id` tinyint(3) NOT NULL,
`bookmark_datestamp` int(10) NOT NULL,
PRIMARY KEY (`bookmark_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;