-
Notifications
You must be signed in to change notification settings - Fork 0
/
hotel_alura_challenge (1).sql
141 lines (113 loc) · 3.18 KB
/
hotel_alura_challenge (1).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
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 28, 2023 at 03:48 PM
-- Server version: 11.1.2-MariaDB
-- PHP Version: 8.2.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 */;
--
-- Database: `hotel_alura_challenge`
--
-- --------------------------------------------------------
--
-- Table structure for table `forma_pago`
--
CREATE TABLE `forma_pago` (
`id` int(11) NOT NULL,
`nombre` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `huesped`
--
CREATE TABLE `huesped` (
`id` int(11) NOT NULL,
`apellido` varchar(255) DEFAULT NULL,
`fechaNacimiento` datetime DEFAULT NULL,
`nacionalidad` varchar(255) DEFAULT NULL,
`nombre` varchar(255) DEFAULT NULL,
`telefono` varchar(255) DEFAULT NULL,
`reserva` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `reserva`
--
CREATE TABLE `reserva` (
`id` int(11) NOT NULL,
`fechaEntrada` datetime DEFAULT NULL,
`fechaSalida` datetime DEFAULT NULL,
`idReserva` int(11) DEFAULT NULL,
`valor` float DEFAULT NULL,
`formaPago` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- --------------------------------------------------------
--
-- Table structure for table `usuario`
--
CREATE TABLE `usuario` (
`id` int(11) NOT NULL,
`nombre` varchar(50) NOT NULL,
`apellido` varchar(50) NOT NULL,
`password` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `usuario`
--
INSERT INTO `usuario` (`id`, `nombre`, `apellido`, `password`) VALUES
(1, 'admin', 'apellido', 'admin');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `forma_pago`
--
ALTER TABLE `forma_pago`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `huesped`
--
ALTER TABLE `huesped`
ADD PRIMARY KEY (`id`),
ADD KEY `FKgl1qrsoxmras69drku6ratb4m` (`reserva`);
--
-- Indexes for table `reserva`
--
ALTER TABLE `reserva`
ADD PRIMARY KEY (`id`),
ADD KEY `FKcv50gum731krvwgw3atgmi8jw` (`formaPago`);
--
-- Indexes for table `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `forma_pago`
--
ALTER TABLE `forma_pago`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `huesped`
--
ALTER TABLE `huesped`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `reserva`
--
ALTER TABLE `reserva`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
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 */;