This repository has been archived by the owner on Oct 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cake_book.sql
129 lines (104 loc) · 3.28 KB
/
cake_book.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 01-Fev-2020 às 17:25
-- Versão do servidor: 5.7.26
-- versão do PHP: 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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: `cake_book`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `files`
--
DROP TABLE IF EXISTS `files`;
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`filename` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
--
-- Extraindo dados da tabela `files`
--
INSERT INTO `files` (`id`, `filename`) VALUES
(0, '24a3c325-3073-4c53-8730-61680749adca-cfp_pessoa.png'),
(2, 'bbd50a29-331b-43ea-ad9f-398c1466f9f7-cakephp1.jpg'),
(3, '82156ef6-16f0-481d-b801-e5b06feda073-cakephp.jpg');
-- --------------------------------------------------------
--
-- Estrutura da tabela `ingredientes`
--
DROP TABLE IF EXISTS `ingredientes`;
CREATE TABLE IF NOT EXISTS `ingredientes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
--
-- Extraindo dados da tabela `ingredientes`
--
INSERT INTO `ingredientes` (`id`, `nome`) VALUES
(2, 'Alfacea'),
(3, 'cenouras'),
(4, 'kk'),
(5, '312'),
(6, '312'),
(7, '312'),
(8, '312');
-- --------------------------------------------------------
--
-- Estrutura da tabela `receitas`
--
DROP TABLE IF EXISTS `receitas`;
CREATE TABLE IF NOT EXISTS `receitas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` text,
`descricao` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
--
-- Extraindo dados da tabela `receitas`
--
INSERT INTO `receitas` (`id`, `nome`, `descricao`) VALUES
(1, 'Receitas das batatas', '123'),
(2, 'A descricao é feita a partir de conteudo', 'www.googl.ptt'),
(6, 'Teste', '3123132132123'),
(7, '123', '123'),
(8, 'hg', 'vn '),
(9, 'Receita Teste 123', 'OMG');
-- --------------------------------------------------------
--
-- Estrutura da tabela `receitas_ingredientes`
--
DROP TABLE IF EXISTS `receitas_ingredientes`;
CREATE TABLE IF NOT EXISTS `receitas_ingredientes` (
`receitas_id` int(11) NOT NULL,
`ingrediente_id` int(11) NOT NULL,
`ingredientes` text NOT NULL,
`receitas` int(11) NOT NULL,
UNIQUE KEY `receitas_id` (`receitas_id`),
UNIQUE KEY `Ingrediente_id` (`ingrediente_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Constraints for dumped tables
--
--
-- Limitadores para a tabela `receitas_ingredientes`
--
ALTER TABLE `receitas_ingredientes`
ADD CONSTRAINT `receitas_ingredientes_ibfk_1` FOREIGN KEY (`receitas_id`) REFERENCES `receitas` (`id`),
ADD CONSTRAINT `receitas_ingredientes_ibfk_2` FOREIGN KEY (`ingrediente_id`) REFERENCES `ingredientes` (`id`);
COMMIT;
/*!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 */;