This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cripto_insecure.sql
72 lines (59 loc) · 1.92 KB
/
cripto_insecure.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
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 17-11-2015 a las 19:57:55
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;
--
-- Base de datos: `cripto.insecure`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `message`
--
CREATE TABLE IF NOT EXISTS `message` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`from_user` bigint(20) NOT NULL,
`to_user` bigint(20) NOT NULL,
`subject` varchar(50) NOT NULL,
`message` varchar(1000) NOT NULL,
PRIMARY KEY (`id`),
KEY `from_user` (`from_user`),
KEY `to_user` (`to_user`)
) ENGINE=InnoDB;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`username` varchar(20) NOT NULL,
`password` varchar(70) NOT NULL,
`email` varchar(50) NOT NULL,
`image` varchar(150) NOT NULL DEFAULT 'images/person.png',
`birthday` date NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB;
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `message`
--
ALTER TABLE `message`
ADD CONSTRAINT `from_user` FOREIGN KEY (`from_user`) REFERENCES `user` (`id`),
ADD CONSTRAINT `to_user` FOREIGN KEY (`to_user`) REFERENCES `user` (`id`);
/*!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 */;