-
Notifications
You must be signed in to change notification settings - Fork 0
/
foodly.sql
114 lines (93 loc) · 3.37 KB
/
foodly.sql
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2017 at 05:01 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!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 utf8mb4 */;
--
-- Database: `foodly`
--
-- --------------------------------------------------------
--
-- Table structure for table `recipes`
--
CREATE TABLE `recipes` (
`recipe_id` int(100) NOT NULL,
`title` varchar(250) NOT NULL,
`description` varchar(200) NOT NULL,
`ingredients` varchar(1000) NOT NULL,
`instructions` varchar(1000) NOT NULL,
`image` varchar(100) NOT NULL,
`user_fk` int(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `recipes`
--
INSERT INTO `recipes` (`recipe_id`, `title`, `description`, `ingredients`, `instructions`, `image`, `user_fk`) VALUES
(2, 'Salmon stake', 'Delicious', 'Salmon and vegetables', 'Cook salmon in low heat for about 3 hours', 'stake.jpg', 2),
(4, 'Chicken stake', 'Delicious chicken ', 'Chicken breast, olive oil, vegetables', 'Mix them all and let them cook in low heat', 'stake.jpg', 1),
(7, 'Vegetable Recipe', '\r\nDelicious vegetable recipe', '1 teaspoon olive oil, 2 yams peeled and cut into wedges, 5 tablespoons fat-free sour cream', 'Preheat an oven to 350 degrees F (175 degrees C). Spread the olive oil over a baking sheet.\r\nArrange the yams on the prepared baking sheet in a single layer; season with the seasoned salt.', 'vegies.jpg', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(100) NOT NULL,
`username` varchar(50) NOT NULL,
`email` varchar(250) NOT NULL,
`password` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `email`, `password`) VALUES
(1, 'Renata', '[email protected]', '$2y$10$oVP/1XrR9V1/M0oMzMaTPukqfImPkEuQW2gR7W/n/WkVWJ3x5akzG'),
(2, 'Filane', '[email protected]', '$2y$10$oLVqroulSCJa2TyZpVcnbeSrcQ66csYjaOOKqRgP3EKi6Ca2/xSta'),
(4, 'Filan ', '[email protected]', '$2y$10$Q/qWh8lDyhNh2At/swKN8.oEJPU8fDTsZMBqNpfsJUr7hunreAKi2');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `recipes`
--
ALTER TABLE `recipes`
ADD PRIMARY KEY (`recipe_id`),
ADD KEY `recipe_fk` (`user_fk`),
ADD KEY `user_fk` (`user_fk`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `recipes`
--
ALTER TABLE `recipes`
MODIFY `recipe_id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `recipes`
--
ALTER TABLE `recipes`
ADD CONSTRAINT `user_fk` FOREIGN KEY (`user_fk`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE;
/*!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 */;