<?
	include('./Conexion.inc.php');

	
	Conectar();  

	$sql = "CREATE TABLE IF NOT EXISTS `Usuarios` (
  `Id` int(11) NOT NULL auto_increment,
  `Mail` varchar(255) NOT NULL,
  `Pass` varchar(255) NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;";
	mysql_query($sql);

	$sql =" CREATE TABLE IF NOT EXISTS `Eventos` (
  `Id` int(11) NOT NULL auto_increment,
  `Dia` int(2) NOT NULL,
  `Mes` int(2) NOT NULL,  
  `Anyo` int(4) NOT NULL,
  `Titulo` varchar(255) NOT NULL,
  `Lugar` varchar(255) NOT NULL,
  `Descripcion` varchar(255) NOT NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;";
	mysql_query($sql);
		
	$sql=" CREATE TABLE IF NOT EXISTS `Noticias` (
  `Id` int(11) NOT NULL auto_increment,
  `Titulo` varchar(255) default NULL,
  `Texto` longtext,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;";
	mysql_query($sql);
	
	$sql="CREATE TABLE IF NOT EXISTS `Tienda` (
  `Id` int(11) NOT NULL auto_increment,
  `Categoria` int(2) NOT NULL,
  `Precio` int(11) NOT NULL, 
  `Nombre` varchar(255) default NULL,
  `Foto` varchar(255) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;";
	mysql_query($sql);

	header("Location:../index.php");
?>