· 6 years ago · Sep 09, 2019, 11:24 PM
1-- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64)
2--
3-- Host: 127.0.0.1 Database: mydb
4-- ------------------------------------------------------
5-- Server version 5.7.26
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!50503 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `comentario`
20--
21
22DROP TABLE IF EXISTS `comentario`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!50503 SET character_set_client = utf8mb4 */;
25CREATE TABLE `comentario` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `texto` varchar(100) NOT NULL,
28 `num_curtida` int(11) NOT NULL DEFAULT '0',
29 `postagem_id` int(11) NOT NULL,
30 `usuario_id` int(11) NOT NULL,
31 PRIMARY KEY (`id`),
32 KEY `fk_comentario_postagem1_idx` (`postagem_id`),
33 KEY `fk_comentario_usuario1_idx` (`usuario_id`),
34 CONSTRAINT `fk_comentario_postagem1` FOREIGN KEY (`postagem_id`) REFERENCES `postagem` (`id`),
35 CONSTRAINT `fk_comentario_usuario1` FOREIGN KEY (`usuario_id`) REFERENCES `usuario` (`id`)
36) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
37/*!40101 SET character_set_client = @saved_cs_client */;
38
39--
40-- Dumping data for table `comentario`
41--
42
43LOCK TABLES `comentario` WRITE;
44/*!40000 ALTER TABLE `comentario` DISABLE KEYS */;
45INSERT INTO `comentario` VALUES (1,'gsdfgfdgfdgfdg',3,1,13),(2,'fdgfd',3,23,1),(3,'gdf',3,45,12),(4,'gdgfd',4,36,14),(5,'gfd',5,7,15),(6,'gfd',43,4,15),(7,'ghfdhdf',53,4,15),(8,'hfdhfdhfdh',4,4,5),(9,'fdh',2,4,15),(10,'fdhfdhfdhfdhfd',3,4,16),(11,'hfdhfdhfdhdfhfdh',43,4,14),(12,'fdhfdhfdhfdhfdhfdhdfh',4,4,4),(13,'fdhdfhfdhdfgsat',34,4,4),(14,'wtferwsvfdsfredregerveg',34,4,4),(15,'cv',35,4,5),(16,'sdfdsfsdgfsdghrshahfdsh',4,4,2),(17,'dfshsdfhgfdhdfsjhdfshfdshfds',23,4,2),(18,'ghfdshsdhsdhesdhtrsehhersheshred',325,4,2),(19,'hdfrshfdshfdshfsdhfdshfds',2346,4,4),(20,'hfdshfdshdshfdsdhsdhsdf',32,4,6),(21,'fhdshfsdhdfshsfhshetrshtrjuh',325,4,7),(22,'ytktjkhdgfjdfgjgfdjhgfsdjyt',23,4,8),(23,'kutkltgdjkdjhdrjtyerdjkytj',62,23,4),(24,'dyfgcyjgjycdjycjcgjgjgy',432,3,3),(25,'jxjfdjfxhxdtsjhtfujytrkjythtsth',3,3,2),(26,'txhdth6d77tjugykjukdxhgsgrsarqea',33,3,4),(27,'ghtdshjyjhdkygkjs',3,3,12),(28,'hrjshtrjeyu7tkddgkhgdhdfhgtf',4,3,14),(29,'shgfshjgthjdtktyjyuikdhgdzgdg',4,3,15),(30,'rgseghrtjhrytktsjfgdhjgfbhreh',3,3,16),(31,'tjrjydjndgnghfnhsnhdmfkghfiks',3,32,15),(32,'sdhrsghsfdhjtrjksjsnhfs',2,2,13),(33,'hajtjtrsdjhtryjstjsjkstjt',3,2,13),(34,'sjsjsrhjteswjtkuytjnhbgfvvntuhgbrfhn',2,2,15),(35,'bgfdecscvdsgbtrrfcdhgtb ',2,23,15),(36,'fvdcbghtvfdcbgvfdcs',2,43,15),(37,'ntbhgrfbrgfvecbghr',3,5,16),(38,'fvecervfcbrgfevcrbg fevcbrgfevcdwbvrtefcdrbgevf',4,3,7);
46/*!40000 ALTER TABLE `comentario` ENABLE KEYS */;
47UNLOCK TABLES;
48
49--
50-- Table structure for table `curtidas_post`
51--
52
53DROP TABLE IF EXISTS `curtidas_post`;
54/*!40101 SET @saved_cs_client = @@character_set_client */;
55/*!50503 SET character_set_client = utf8mb4 */;
56CREATE TABLE `curtidas_post` (
57 `curtidor` int(11) NOT NULL,
58 `postagem_id` int(11) NOT NULL,
59 PRIMARY KEY (`curtidor`,`postagem_id`),
60 KEY `fk_curtidas_post_usuario1_idx` (`curtidor`),
61 KEY `fk_curtidas_post_postagem1_idx` (`postagem_id`),
62 CONSTRAINT `fk_curtidas_post_postagem1` FOREIGN KEY (`postagem_id`) REFERENCES `postagem` (`id`),
63 CONSTRAINT `fk_curtidas_post_usuario1` FOREIGN KEY (`curtidor`) REFERENCES `usuario` (`id`)
64) ENGINE=InnoDB DEFAULT CHARSET=utf8;
65/*!40101 SET character_set_client = @saved_cs_client */;
66
67--
68-- Dumping data for table `curtidas_post`
69--
70
71LOCK TABLES `curtidas_post` WRITE;
72/*!40000 ALTER TABLE `curtidas_post` DISABLE KEYS */;
73INSERT INTO `curtidas_post` VALUES (1,38),(2,3),(2,37),(3,2),(3,5),(3,37),(4,12),(4,37),(5,35),(6,35),(7,35),(8,35),(9,35),(10,35),(11,35),(12,21),(12,23),(12,37),(13,4),(13,38),(14,3),(14,37),(15,1),(15,36),(16,35),(16,54),(17,3),(17,4),(17,43),(18,2),(19,36),(20,4),(20,21),(20,23),(20,26),(21,3),(21,5),(21,25),(22,23),(22,34),(23,3),(23,24),(23,53),(24,3),(24,23),(24,37),(25,21),(25,25),(25,35),(25,53),(26,5),(26,33),(26,34),(27,24),(28,34);
74/*!40000 ALTER TABLE `curtidas_post` ENABLE KEYS */;
75UNLOCK TABLES;
76
77--
78-- Table structure for table `images`
79--
80
81DROP TABLE IF EXISTS `images`;
82/*!40101 SET @saved_cs_client = @@character_set_client */;
83/*!50503 SET character_set_client = utf8mb4 */;
84CREATE TABLE `images` (
85 `post_id` int(11) DEFAULT NULL,
86 `image_url` varchar(55) NOT NULL,
87 KEY `post_id_fk_idx` (`post_id`),
88 CONSTRAINT `post_id_fk` FOREIGN KEY (`post_id`) REFERENCES `postagem` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
89) ENGINE=InnoDB DEFAULT CHARSET=utf8;
90/*!40101 SET character_set_client = @saved_cs_client */;
91
92--
93-- Dumping data for table `images`
94--
95
96LOCK TABLES `images` WRITE;
97/*!40000 ALTER TABLE `images` DISABLE KEYS */;
98/*!40000 ALTER TABLE `images` ENABLE KEYS */;
99UNLOCK TABLES;
100
101--
102-- Table structure for table `postagem`
103--
104
105DROP TABLE IF EXISTS `postagem`;
106/*!40101 SET @saved_cs_client = @@character_set_client */;
107/*!50503 SET character_set_client = utf8mb4 */;
108CREATE TABLE `postagem` (
109 `id` int(11) NOT NULL AUTO_INCREMENT,
110 `text` varchar(350) DEFAULT NULL,
111 `usuario_id` int(11) NOT NULL,
112 PRIMARY KEY (`id`),
113 KEY `fk_postagem_usuario1_idx` (`usuario_id`),
114 CONSTRAINT `fk_postagem_usuario1` FOREIGN KEY (`usuario_id`) REFERENCES `usuario` (`id`)
115) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;
116/*!40101 SET character_set_client = @saved_cs_client */;
117
118--
119-- Dumping data for table `postagem`
120--
121
122LOCK TABLES `postagem` WRITE;
123/*!40000 ALTER TABLE `postagem` DISABLE KEYS */;
124INSERT INTO `postagem` VALUES (1,'bsdnfjsdnjfndsjkfnsdjfnsdfsfsd',4),(2,'adsadsadfasgfafsafasfafasf',5),(3,'fsafasfasfsafsafasfsafasfas',28),(4,'trhrtrhrthrthrhtrhtrhtrhtrhrt',8),(5,'sdfsdafsdsvsvsdsvsdvsdvsd',5),(6,'ynjythjyfsfrjytktjytjkyttergte',2),(7,'fdfssghthedbvdffndbd',1),(8,'ssghnjyttbdsgfsdgfshfbhfdhdf',4),(9,'fdgfdgtyhjhtfdzgdfhshdh',5),(10,'dhdhjtjyrjhszhtsrnmsrntnbsd',7),(11,'fdhdhdhdhdfhdfhrb',3),(12,'hfdshsahsdjjktjsajhsatj',2),(13,'dgdsgsegsdgsdfghfsdhfdhgfd',2),(14,'gfdhdsajhjtsrjht',5),(15,'fdhdhdhdhdfhdfhrb',6),(16,'fdfssghthedbvdffndbd',3),(17,'ynjythjyfsfrjytktjytjkyttergte',2),(18,'trhrtrhrthrthrhtrhtrhtrhtrhrt',1),(19,'fdfssghthedbvdffndbd',14),(20,'fdhdhdhdhdfhdfhrb',16),(21,'fdhdhdhdhdfhdfhrb',16),(22,'dgdsgsegsdgsdfghfsdhfdhgfd',15),(23,'gfdhdsajhjtsrjht',17),(24,'hfdshsahsdjjktjsajhsatj',18),(25,'dhdhjtjyrjhszhtsrnmsrntnbsd',19),(26,'hfdshsahsdjjktjsajhsatj',20),(27,'dhdhjtjyrjhszhtsrnmsrntnbsd',21),(28,'fdhdhdhdhdfhdfhrb',2),(29,'fdhdhdhdhdfhdfhrb',22),(30,'fdfssghthedbvdffndbd',23),(31,'fdhdhdhdhdfhdfhrb',24),(32,'gfdhdsajhjtsrjht',25),(33,'dhdhjtjyrjhszhtsrnmsrntnbsd',26),(34,'fdhdhdhdhdfhdfhrb',27),(35,'hfdshsahsdjjktjsajhsatj',28),(36,'dhdhjtjyrjhszhtsrnmsrntnbsd',11),(37,'hfdshsahsdjjktjsajhsatj',1),(38,'gfdhdsajhjtsrjht',2),(39,'hgfnkgfnbgjfnbgfnbgf',3),(40,'hfdshsahsdjjktjsajhsatj',4),(41,'hgfngfkonbhgiunbjytu',5),(42,'hghjghfklohniufnhjgftruihbg',6),(43,'gfdhdsajhjtsrjht',7),(44,'yhjbgfbfgbtyniujynbiuf',8),(45,'hfdshsahsdjjktjsajhsatj',9),(46,'hgtklmjhytmnbtiobniuobntynyt',11),(47,'gfdhdsajhjtsrjht',24),(48,'jhytmkljynibnytibhnythnty',26),(49,'dshfdsgsdfjnbkhfhfhs',1),(50,'dsfdsfdshfshfuidsfsd',1),(51,'hfdshsahsdjjktjsajhsatj',4),(52,'dfshdhfsdghfdhfdshdf',6),(53,'gfdhdsajhjtsrjht',7),(54,'asfgfdgdhdfhdhdfh',7),(55,'hfdshsahsdjjktjsajhsatj',9),(56,'dsadsadsadsadas',13),(57,'gfdhdsajhjtsrjht',16),(58,'gfdhdsajhjtsrjht',12),(59,'hfdshsahsdjjktjsajhsatj',17),(60,'jaanjsnjsn',1);
125/*!40000 ALTER TABLE `postagem` ENABLE KEYS */;
126UNLOCK TABLES;
127
128--
129-- Table structure for table `segue`
130--
131
132DROP TABLE IF EXISTS `segue`;
133/*!40101 SET @saved_cs_client = @@character_set_client */;
134/*!50503 SET character_set_client = utf8mb4 */;
135CREATE TABLE `segue` (
136 `requisitante` int(11) NOT NULL,
137 `recebedor` int(11) NOT NULL,
138 PRIMARY KEY (`requisitante`,`recebedor`),
139 KEY `fk_segue_usuario1_idx` (`requisitante`),
140 KEY `fk_segue_usuario2_idx` (`recebedor`),
141 CONSTRAINT `fk_segue_usuario1` FOREIGN KEY (`requisitante`) REFERENCES `usuario` (`id`),
142 CONSTRAINT `fk_segue_usuario2` FOREIGN KEY (`recebedor`) REFERENCES `usuario` (`id`)
143) ENGINE=InnoDB DEFAULT CHARSET=utf8;
144/*!40101 SET character_set_client = @saved_cs_client */;
145
146--
147-- Dumping data for table `segue`
148--
149
150LOCK TABLES `segue` WRITE;
151/*!40000 ALTER TABLE `segue` DISABLE KEYS */;
152INSERT INTO `segue` VALUES (1,1),(1,2),(1,5),(1,6),(2,12),(2,13),(3,12),(3,16),(3,17),(4,2),(4,5),(4,13),(4,19),(5,6),(5,14),(6,4),(6,18),(6,19),(7,1),(7,8),(7,14),(7,15),(8,4),(8,11),(8,14),(9,3),(9,15),(10,15),(10,18),(11,2),(11,6),(11,14),(11,15),(12,3),(12,5),(12,15),(12,16),(12,28),(13,2),(13,16),(14,1),(14,7),(14,16),(15,15),(15,28),(16,2),(16,5),(16,7),(17,14),(18,5),(18,15),(19,17),(20,15),(21,2),(21,14),(21,21),(22,1),(22,2),(22,3),(22,6),(22,7),(22,13),(22,20),(22,21),(22,23),(23,13),(24,21),(25,12),(25,27),(26,26),(27,25),(28,15),(28,24);
153/*!40000 ALTER TABLE `segue` ENABLE KEYS */;
154UNLOCK TABLES;
155
156--
157-- Table structure for table `sexo`
158--
159
160DROP TABLE IF EXISTS `sexo`;
161/*!40101 SET @saved_cs_client = @@character_set_client */;
162/*!50503 SET character_set_client = utf8mb4 */;
163CREATE TABLE `sexo` (
164 `id` int(11) NOT NULL AUTO_INCREMENT,
165 `identificador` varchar(45) NOT NULL,
166 PRIMARY KEY (`id`)
167) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
168/*!40101 SET character_set_client = @saved_cs_client */;
169
170--
171-- Dumping data for table `sexo`
172--
173
174LOCK TABLES `sexo` WRITE;
175/*!40000 ALTER TABLE `sexo` DISABLE KEYS */;
176INSERT INTO `sexo` VALUES (1,'masculino'),(2,'feminino '),(3,'prefiro não informar');
177/*!40000 ALTER TABLE `sexo` ENABLE KEYS */;
178UNLOCK TABLES;
179
180--
181-- Table structure for table `status`
182--
183
184DROP TABLE IF EXISTS `status`;
185/*!40101 SET @saved_cs_client = @@character_set_client */;
186/*!50503 SET character_set_client = utf8mb4 */;
187CREATE TABLE `status` (
188 `id` int(11) NOT NULL AUTO_INCREMENT,
189 `identificador` varchar(55) NOT NULL,
190 PRIMARY KEY (`id`)
191) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
192/*!40101 SET character_set_client = @saved_cs_client */;
193
194--
195-- Dumping data for table `status`
196--
197
198LOCK TABLES `status` WRITE;
199/*!40000 ALTER TABLE `status` DISABLE KEYS */;
200INSERT INTO `status` VALUES (1,'solteiro '),(2,'casado '),(3,'namorando'),(4,'em um relacionamento sério'),(5,'noivo'),(6,'em uma união estável'),(7,'morando junto'),(8,'em um relacionamento aberto '),(9,'em um relacionamento complicado'),(10,'separado'),(11,'divorciado'),(12,'viúvo');
201/*!40000 ALTER TABLE `status` ENABLE KEYS */;
202UNLOCK TABLES;
203
204--
205-- Table structure for table `usuario`
206--
207
208DROP TABLE IF EXISTS `usuario`;
209/*!40101 SET @saved_cs_client = @@character_set_client */;
210/*!50503 SET character_set_client = utf8mb4 */;
211CREATE TABLE `usuario` (
212 `id` int(11) NOT NULL AUTO_INCREMENT,
213 `nome` varchar(55) NOT NULL,
214 `avatar_url` varchar(150) DEFAULT NULL,
215 `data_nascimento` datetime NOT NULL,
216 `sexo_id` int(11) NOT NULL,
217 `status_id` int(11) NOT NULL,
218 `email` varchar(55) DEFAULT NULL,
219 `telefone` varchar(55) DEFAULT NULL,
220 PRIMARY KEY (`id`),
221 UNIQUE KEY `email_UNIQUE` (`email`),
222 UNIQUE KEY `telefone_UNIQUE` (`telefone`),
223 KEY `fk_usuario_sexo_idx` (`sexo_id`),
224 KEY `fk_usuario_estado_civil1_idx` (`status_id`),
225 CONSTRAINT `fk_usuario_estado_civil1` FOREIGN KEY (`status_id`) REFERENCES `status` (`id`),
226 CONSTRAINT `fk_usuario_sexo` FOREIGN KEY (`sexo_id`) REFERENCES `sexo` (`id`)
227) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;
228/*!40101 SET character_set_client = @saved_cs_client */;
229
230--
231-- Dumping data for table `usuario`
232--
233
234LOCK TABLES `usuario` WRITE;
235/*!40000 ALTER TABLE `usuario` DISABLE KEYS */;
236INSERT INTO `usuario` VALUES (1,'Luis Fernando Medonça','http://tst2.face','1987-05-03 13:00:00',1,4,'abc@c.net',NULL),(2,'Pablo Medonça Filho','http://dsada.face','1999-02-16 00:00:00',3,3,'def@c.net',NULL),(3,'Carlos medeiros Fernandes',NULL,'1997-05-10 00:00:00',1,2,'ghi@c.net',NULL),(4,'Pedro Fonseca Neves','http://dfsajhda.face','1989-07-08 15:00:00',1,5,'jkl@c.net',NULL),(5,'Gustavo Motta','http://ddsds.face','1999-05-20 00:00:00',1,1,'mno@c.net',NULL),(6,'Matheus Aragão Pulitzer',NULL,'1992-06-22 00:00:00',1,4,'pqr@c.net',NULL),(7,'José fonseca Neves ','http://hsahu.face','1988-08-13 00:00:00',1,5,'stu@c.net',NULL),(8,'Pedro Gstavo Magno','http://dsadas.face','1987-03-01 00:00:00',1,1,'vxy@c.net',NULL),(9,'Irandir Santos Penna','http://dsfsdf.face','2007-05-12 00:00:00',1,1,'zqa@c.net',NULL),(10,'Lucas Mester Fillip','http://fdsfsdj.face','2004-06-11 00:00:00',3,6,'abca@c.net',NULL),(11,'Fernando Plenio ','http://sdaasdj.face','1995-08-25 00:00:00',1,7,'abqc@c.net',NULL),(12,'Luis Argentino','http://dsada.face','1997-03-12 00:00:00',1,2,'aqbc@c.net',NULL),(13,'Pedro Murilo Escavella','http://kenjf.face','2001-05-08 00:00:00',1,1,'abqqsac@c.net',NULL),(14,'Lucas Nuvilo Merlo','http://fdmmbe.face','1999-11-03 00:00:00',1,3,'abcqq@c.net',NULL),(15,'Vercilo Manuel Santos',NULL,'1998-12-08 00:00:00',3,5,'qaas@c.net',NULL),(16,'Helio Lucas Manuel ',NULL,'2003-06-23 00:00:00',1,5,'qasc@c.net',NULL),(17,'Luisa Manuela ','http://jrfrn.face','2001-07-22 00:00:00',2,3,'aqqaqbc@c.net',NULL),(18,'Maria Fernanda ','http://lkyhynjktng.face','1998-06-23 00:00:00',2,2,'qqa@c.net',NULL),(19,'Manuela Carla Fernandes','http://khtmhythn.face','1999-05-19 00:00:00',2,7,'adas@c.net',NULL),(20,'Mila Fernandes Corola',NULL,'1988-11-24 00:00:00',2,1,'adasd@c.net',NULL),(21,'Maria luisa mederiros ','http://sjdnajdas.face','1999-12-22 00:00:00',2,1,'qqqq@c.net',NULL),(22,'Amanda Costa Pinho','http://jdsnfsdnf.face','1992-11-23 00:00:00',2,5,'qsasa@c.net',NULL),(23,'Livia Pinheiro Medeiros','http://ymhykhk.face ','2007-10-10 00:00:00',2,7,'qqas@c.net',NULL),(24,'Isabella Santos Novaes',NULL,'2001-08-20 00:00:00',2,8,'qqaa@c.net',NULL),(25,'Deborah Santos pinho ','http://njtnrre.face','1998-08-20 00:00:00',2,9,'qas@c.net',NULL),(26,'Isaura Angela Pulitzer','http://mtntnjr.face','1999-02-14 00:00:00',3,10,NULL,'(55) 55555-5555'),(27,'Liliane Marinho Theodora','http://dgtnyh.face','1998-07-12 00:00:00',2,11,NULL,'(88) 88888-8888'),(28,'Jussara Gusman Theo','http://jsdnbajnd.face','1999-07-22 00:00:00',2,9,NULL,'(77) 77777-7777'),(30,'NOME',NULL,'1999-07-22 00:00:00',1,1,'aearthur99@gmail.com',NULL),(31,'NOME',NULL,'1999-07-22 00:00:00',1,1,NULL,'81996099275');
237/*!40000 ALTER TABLE `usuario` ENABLE KEYS */;
238UNLOCK TABLES;
239
240--
241-- Table structure for table `videos`
242--
243
244DROP TABLE IF EXISTS `videos`;
245/*!40101 SET @saved_cs_client = @@character_set_client */;
246/*!50503 SET character_set_client = utf8mb4 */;
247CREATE TABLE `videos` (
248 `video_url` varchar(55) NOT NULL,
249 `post_id` int(11) DEFAULT NULL,
250 KEY `post_id_fk_idx` (`post_id`),
251 CONSTRAINT `post_id_vide_fk` FOREIGN KEY (`post_id`) REFERENCES `postagem` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
252) ENGINE=InnoDB DEFAULT CHARSET=utf8;
253/*!40101 SET character_set_client = @saved_cs_client */;
254
255--
256-- Dumping data for table `videos`
257--
258
259LOCK TABLES `videos` WRITE;
260/*!40000 ALTER TABLE `videos` DISABLE KEYS */;
261/*!40000 ALTER TABLE `videos` ENABLE KEYS */;
262UNLOCK TABLES;
263
264--
265-- Dumping routines for database 'mydb'
266--
267/*!50003 DROP PROCEDURE IF EXISTS `register` */;
268/*!50003 SET @saved_cs_client = @@character_set_client */ ;
269/*!50003 SET @saved_cs_results = @@character_set_results */ ;
270/*!50003 SET @saved_col_connection = @@collation_connection */ ;
271/*!50003 SET character_set_client = utf8mb4 */ ;
272/*!50003 SET character_set_results = utf8mb4 */ ;
273/*!50003 SET collation_connection = utf8mb4_general_ci */ ;
274/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
275/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ;
276DELIMITER ;;
277CREATE DEFINER=`root`@`%` PROCEDURE `register`(IN name VARCHAR(55), IN access_identifier VARCHAR(55), IN nascimento DATETIME, IN sexo INT)
278BEGIN
279 IF (access_identifier REGEXP '^[^@]+@[^@]+\.[^@]{2,}$') THEN
280 INSERT INTO `mydb`.`usuario` (`nome`, `data_nascimento`, `sexo_id`, `email`, `status_id`) VALUES ('NOME', '1999-07-22 00:00:00', sexo, access_identifier, 1);
281 ELSE
282 INSERT INTO `mydb`.`usuario` (`nome`, `data_nascimento`, `sexo_id`, `telefone`, `status_id`) VALUES ('NOME', '1999-07-22 00:00:00', sexo, access_identifier, 1);
283 END IF;
284END ;;
285DELIMITER ;
286/*!50003 SET sql_mode = @saved_sql_mode */ ;
287/*!50003 SET character_set_client = @saved_cs_client */ ;
288/*!50003 SET character_set_results = @saved_cs_results */ ;
289/*!50003 SET collation_connection = @saved_col_connection */ ;
290/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
291
292/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
293/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
294/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
295/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
296/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
297/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
298/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
299
300-- Dump completed on 2019-09-09 20:20:19