-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.after.backup.sql
145 lines (126 loc) · 5.67 KB
/
dev.after.backup.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
-- MySQL dump 10.13 Distrib 5.7.19, for Win64 (x86_64)
--
-- Host: localhost Database: nomina
-- ------------------------------------------------------
-- Server version 5.7.19-log
/*!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 utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `cargo`
--
DROP TABLE IF EXISTS `cargo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cargo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Nombre` varchar(40) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cargo`
--
LOCK TABLES `cargo` WRITE;
/*!40000 ALTER TABLE `cargo` DISABLE KEYS */;
INSERT INTO `cargo` VALUES (1,'DESARROLLADOR');
/*!40000 ALTER TABLE `cargo` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `empleado`
--
DROP TABLE IF EXISTS `empleado`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `empleado` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`NOMBRE` varchar(40) NOT NULL,
`APELLIDO` varchar(40) NOT NULL,
`CargoId` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `EmpleadoCargo` (`CargoId`),
CONSTRAINT `EmpleadoCargo` FOREIGN KEY (`CargoId`) REFERENCES `cargo` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `empleado`
--
LOCK TABLES `empleado` WRITE;
/*!40000 ALTER TABLE `empleado` DISABLE KEYS */;
INSERT INTO `empleado` VALUES (1,'MARCELA','CARDONA',1);
/*!40000 ALTER TABLE `empleado` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `schema_version`
--
DROP TABLE IF EXISTS `schema_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schema_version` (
`installed_rank` int(11) NOT NULL,
`version` varchar(50) DEFAULT NULL,
`description` varchar(200) NOT NULL,
`type` varchar(20) NOT NULL,
`script` varchar(1000) NOT NULL,
`checksum` int(11) DEFAULT NULL,
`installed_by` varchar(100) NOT NULL,
`installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`execution_time` int(11) NOT NULL,
`success` tinyint(1) NOT NULL,
PRIMARY KEY (`installed_rank`),
KEY `schema_version_s_idx` (`success`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `schema_version`
--
LOCK TABLES `schema_version` WRITE;
/*!40000 ALTER TABLE `schema_version` DISABLE KEYS */;
INSERT INTO `schema_version` VALUES (1,'1.1','Crear tabla empleado','SQL','V1.1__Crear tabla empleado.sql',-1945339738,'dev','2017-09-11 14:30:05',680,1),(2,'1.2','Crear tabla cargo','SQL','V1.2__Crear tabla cargo.sql',-303048134,'dev','2017-09-11 14:30:06',544,1),(3,'1.3','Crear relacion Empleado-Cargo','SQL','V1.3__Crear relacion Empleado-Cargo.sql',-1685987658,'dev','2017-09-11 14:30:10',3831,1),(4,'1.4','Crear Vista Empleado','SQL','V1.4__Crear Vista Empleado.sql',474292473,'dev','2017-09-11 14:30:10',148,1),(5,'1.5','Insertar datos en Empleado y Cargo','SQL','V1.5__Insertar datos en Empleado y Cargo.sql',-1429500660,'dev','2017-09-11 14:39:24',3,1);
/*!40000 ALTER TABLE `schema_version` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Temporary table structure for view `vistaempleado`
--
DROP TABLE IF EXISTS `vistaempleado`;
/*!50001 DROP VIEW IF EXISTS `vistaempleado`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `vistaempleado` AS SELECT
1 AS `Id_Empleado`,
1 AS `Nombre`,
1 AS `Apellido`,
1 AS `Cargo`*/;
SET character_set_client = @saved_cs_client;
--
-- Final view structure for view `vistaempleado`
--
/*!50001 DROP VIEW IF EXISTS `vistaempleado`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
/*!50001 SET character_set_client = utf8 */;
/*!50001 SET character_set_results = utf8 */;
/*!50001 SET collation_connection = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`dev`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `vistaempleado` AS select `empleado`.`id` AS `Id_Empleado`,`empleado`.`NOMBRE` AS `Nombre`,`empleado`.`APELLIDO` AS `Apellido`,`cargo`.`Nombre` AS `Cargo` from (`empleado` left join `cargo` on((`empleado`.`CargoId` = `cargo`.`id`))) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2017-09-11 13:49:25