 -- phpMyAdmin SQL Dump
--- version 4.1.12
+-- version 4.2.7.1
 -- http://www.phpmyadmin.net
 --
--- Servidor: localhost
--- Tiempo de generación: 12-10-2014 a las 22:08:59
--- Versión del servidor: 5.6.16
--- Versión de PHP: 5.5.11
+-- Host: localhost
+-- Generation Time: Nov 02, 2014 at 10:39 PM
+-- Server version: 5.6.20
+-- PHP Version: 5.5.15
 
 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
 SET time_zone = "+00:00";

  `id_area` int(11) NOT NULL,
  `id_subarea` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_event` (`id_event`),
  KEY `id_area` (`id_area`,`id_subarea`),
  KEY `id_user` (`id_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `STATUS_COMMENT`
--

CREATE TABLE IF NOT EXISTS `STATUS_COMMENT` (
  `id` int(11) NOT NULL,
  `description` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `STATUS_COMMENT`
--

INSERT INTO `STATUS_COMMENT` (`id`, `description`) VALUES
  (1, 'Pendiente Aprobación'),
  (2, 'Aprobado'),
  (3, 'Denunciado'),
  (4, 'Eliminado');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `SUBAREA`
--

CREATE TABLE IF NOT EXISTS `SUBAREA` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(100) CHARACTER SET utf8 NOT NULL,
  `id_area` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `USER`
--

CREATE TABLE IF NOT EXISTS `USER` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(60) NOT NULL,
  `email` varchar(30) NOT NULL,
  `password` varchar(30) NOT NULL,
  `id_user_type` int(11) NOT NULL,
  `active` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `EMAIL` (`email`),
  KEY `id_user_type` (`id_user_type`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ;

--
-- Volcado de datos para la tabla `USER`
--

INSERT INTO `USER` (`id`, `name`, `email`, `password`, `id_user_type`, `active`) VALUES
  (1, 'Martin', 'mmaestri@gmail.com', '123456', 2, 1),
  (19, 'usuario@mail.com', 'usuario@mail.com', '123456', 2, 1),
  (39, 'user@mail.com', 'user@mail.com', '123456', 2, 1),
  (40, 'otro@mail.com', 'otro@mail.com', '123456', 2, 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `USER_TYPE`
--

CREATE TABLE IF NOT EXISTS `USER_TYPE` (
  `id` int(11) NOT NULL,
  `description` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `USER_TYPE`
--

INSERT INTO `USER_TYPE` (`id`, `description`) VALUES
  (1, 'Administrador'),
  (2, 'Publicador'),
  (3, 'Usuario General');

/*!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 */;

/*!40101 SET NAMES utf8 */;

--
-- Database: `u185673925_event`
--
CREATE DATABASE IF NOT EXISTS `u185673925_event` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `u185673925_event`;

-- --------------------------------------------------------

--
-- Table structure for table `ALERT`
--

DROP TABLE IF EXISTS `ALERT`;
CREATE TABLE IF NOT EXISTS `ALERT` (
`id` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `id_area` int(11) DEFAULT NULL,
  `id_subarea` int(11) DEFAULT NULL,
  `keyword` varchar(100) NOT NULL,
  `active` int(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `AREA`
--

DROP TABLE IF EXISTS `AREA`;
CREATE TABLE IF NOT EXISTS `AREA` (
`id` int(11) NOT NULL,
  `description` varchar(300) CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `COMMENT`
--

DROP TABLE IF EXISTS `COMMENT`;
CREATE TABLE IF NOT EXISTS `COMMENT` (
`id` int(11) NOT NULL,
  `text` varchar(300) NOT NULL,
  `id_status_comment` int(11) NOT NULL DEFAULT '1',
  `id_event` int(11) NOT NULL,
  `stars` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `EVENT`
--

DROP TABLE IF EXISTS `EVENT`;
CREATE TABLE IF NOT EXISTS `EVENT` (
`Id` int(11) NOT NULL,
  `IdUser` int(11) DEFAULT NULL,
  `Active` int(1) NOT NULL DEFAULT '1',
  `Altura` varchar(100) DEFAULT NULL,
  `Calle` varchar(300) DEFAULT NULL,
  `DescripcionCalendario` varchar(3000) DEFAULT NULL,
  `DescripcionEvento` varchar(3000) DEFAULT NULL,
  `Destacado` varchar(1000) DEFAULT NULL,
  `DetaleTexto` int(1) DEFAULT NULL,
  `DetalleTexto` varchar(3000) DEFAULT NULL,
  `DireccionEvento` varchar(500) DEFAULT NULL,
  `FechaHoraFin` varchar(500) DEFAULT NULL,
  `FechaHoraInicio` varchar(500) DEFAULT NULL,
  `Frecuencia` varchar(300) DEFAULT NULL,
  `IdArea` int(11) NOT NULL,
  `IdCalendario` int(11) NOT NULL,
  `IdEvento` int(11) NOT NULL,
  `IdSubarea` int(11) NOT NULL,
  `Latitud` varchar(500) DEFAULT NULL,
  `Longitud` varchar(500) DEFAULT NULL,
  `Lugar` varchar(500) DEFAULT NULL,
  `NombreArea` varchar(500) NOT NULL,
  `NombreCalendario` varchar(500) NOT NULL,
  `NombreEvento` varchar(500) NOT NULL,
  `NombreSubAreaFormat` varchar(500) NOT NULL,
  `NombreSubArea` varchar(500) NOT NULL,
  `Precio` decimal(10,0) DEFAULT NULL,
  `Repetir` varchar(500) DEFAULT NULL,
  `RutaImagen` varchar(2000) DEFAULT NULL,
  `RutaImagenMiniatura` varchar(2000) DEFAULT NULL,
  `TodoDia` int(1) DEFAULT NULL,
  `ZonaHoraria` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `EVENT-API`
--

DROP TABLE IF EXISTS `EVENT-API`;
CREATE TABLE IF NOT EXISTS `EVENT-API` (
  `Altura` varchar(100) NOT NULL,
  `Calle` varchar(300) NOT NULL,
  `DescripcionCalendario` varchar(3000) NOT NULL,
  `DescripcionEvento` varchar(3000) NOT NULL,
  `Destacado` varchar(1000) NOT NULL,
  `DetaleTexto` int(1) NOT NULL,
  `DetalleTexto` varchar(3000) NOT NULL,
  `DireccionEvento` varchar(500) NOT NULL,
  `FechaHoraFin` varchar(500) NOT NULL,
  `FechaHoraInicio` varchar(500) NOT NULL,
  `Frecuencia` varchar(300) NOT NULL,
  `IdArea` int(11) NOT NULL,
  `IdCalendario` int(11) NOT NULL,
  `IdEvento` int(11) NOT NULL,
  `IdSubarea` int(11) NOT NULL,
  `Latitud` varchar(500) NOT NULL,
  `Longitud` varchar(500) NOT NULL,
  `Lugar` varchar(500) NOT NULL,
  `NombreArea` varchar(500) NOT NULL,
  `NombreCalendario` varchar(500) NOT NULL,
  `NombreEvento` varchar(500) NOT NULL,
  `NombreSubAreaFormat` varchar(500) NOT NULL,
  `NombreSubArea` varchar(500) NOT NULL,
  `Precio` decimal(10,0) NOT NULL,
  `Repetir` varchar(500) NOT NULL,
  `RutaImagen` varchar(2000) NOT NULL,
  `RutaImagenMiniatura` varchar(2000) NOT NULL,
  `TodoDia` int(1) NOT NULL,
  `ZonaHoraria` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `EVENT-not-used`
--

DROP TABLE IF EXISTS `EVENT-not-used`;
CREATE TABLE IF NOT EXISTS `EVENT-not-used` (
`id` int(11) NOT NULL,
  `id_event` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(3000) NOT NULL,
