-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sql
More file actions
116 lines (93 loc) · 2.73 KB
/
script.sql
File metadata and controls
116 lines (93 loc) · 2.73 KB
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
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: sql.freedb.tech
-- Generation Time: May 27, 2023 at 01:43 AM
-- Server version: 8.0.28
-- PHP Version: 8.0.16
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 */;
--
-- Database: `freedb_projeto_orm`
--
-- --------------------------------------------------------
--
-- Table structure for table `clientes`
--
CREATE TABLE `clientes` (
`id` bigint NOT NULL,
`cpf` bigint DEFAULT NULL,
`nome` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `clientes`
--
INSERT INTO `clientes` (`id`, `cpf`, `nome`) VALUES
(1, 11929826303, 'Ana Zaira'),
(2, 26752965030, 'Beatriz Yana');
-- --------------------------------------------------------
--
-- Table structure for table `contratos`
--
CREATE TABLE `contratos` (
`id` bigint NOT NULL,
`cliente_id` bigint NOT NULL,
`redacao` mediumtext,
`ultima_atualizacao` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping data for table `contratos`
--
INSERT INTO `contratos` (`id`, `cliente_id`, `redacao`, `ultima_atualizacao`) VALUES
(1, 1, 'Contrato por tempo determinado', '2023-05-21'),
(2, 1, 'Contrato por tempo indeterminado', '2023-05-01'),
(3, 1, 'Contrato de trabalho eventual', '2023-05-26'),
(4, 2, 'Contrato de estágio', '2023-10-15'),
(5, 2, 'Contrato de experiência', '2023-09-16'),
(6, 2, 'Contrato de teletrabalho', '2023-08-17'),
(7, 2, 'Contrato intermitente', '2023-07-15');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `clientes`
--
ALTER TABLE `clientes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `contratos`
--
ALTER TABLE `contratos`
ADD PRIMARY KEY (`id`),
ADD KEY `cliente_id` (`cliente_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `clientes`
--
ALTER TABLE `clientes`
MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `contratos`
--
ALTER TABLE `contratos`
MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `contratos`
--
ALTER TABLE `contratos`
ADD CONSTRAINT `contratos_ibfk_1` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`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 */;