-
Notifications
You must be signed in to change notification settings - Fork 0
/
laravel.sql
96 lines (79 loc) · 3.37 KB
/
laravel.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
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Tempo de geração: 02-Set-2021 às 01:04
-- Versão do servidor: 8.0.21
-- versão do PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;
--
-- Banco de dados: `laravel`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `book`
--
DROP TABLE IF EXISTS `book`;
CREATE TABLE IF NOT EXISTS `book` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
`id_user` int UNSIGNED NOT NULL,
`title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`pages` int NOT NULL,
`price` double(10,2) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `book_id_user_foreign` (`id_user`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Extraindo dados da tabela `book`
--
INSERT INTO `book` (`id`, `id_user`, `title`, `pages`, `price`, `created_at`, `updated_at`) VALUES
(2, 2, 'O vento levou', 450, 200.00, '2021-09-01 05:59:19', '2021-09-01 05:59:19'),
(3, 3, 'Rosa Negra 2', 355, 35.99, '2021-09-01 15:36:45', '2021-09-01 15:37:17'),
(4, 1, 'Dom Quixote', 150, 110.50, '2021-09-01 17:38:32', '2021-09-01 17:38:32'),
(5, 2, 'Divergente', 502, 30.00, '2021-09-01 17:38:32', '2021-09-01 17:38:32'),
(6, 3, 'Mais esperto que o Diabo', 300, 24.90, '2021-09-01 17:38:32', '2021-09-01 17:38:32');
-- --------------------------------------------------------
--
-- Estrutura da tabela `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email_verified_at` timestamp NULL DEFAULT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Extraindo dados da tabela `users`
--
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Pedro', '[email protected]', '2021-09-01 00:20:49', '123', '321', '2021-09-01 00:20:49', '2021-09-01 00:20:49'),
(2, 'Julia', '[email protected]', '2021-09-01 02:56:48', '123', '321', '2021-09-01 02:56:48', '2021-09-01 02:56:48'),
(3, 'Thiago', '[email protected]', '2021-09-01 02:57:48', '123', '321', '2021-09-01 02:57:48', '2021-09-01 02:57:48');
--
-- Restrições para despejos de tabelas
--
--
-- Limitadores para a tabela `book`
--
ALTER TABLE `book`
ADD CONSTRAINT `book_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;