CREATE TABLE ip (
id_ip BIGINT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
numero_ip VARCHAR( 15 ) NOT NULL,
fecha_ip DATE NOT NULL,
hora_ip TIME NOT NULL
) ENGINE = MYISAM;
CREATE TABLE usuario (
id_usuario BIGINT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
id_ip BIGINT( 11 ) NOT NULL,
nick_usuario VARCHAR( 40 ) NOT NULL,
pass_usuario VARCHAR( 40 ) NOT NULL,
correo_usuario VARCHAR( 75 ) NOT NULL,
nombre_usuario VARCHAR( 75 ) NOT NULL,
nivel_usuario SMALLINT (1) NOT NULL
) ENGINE = MYISAM;
CREATE TABLE mensaje (
id_mensaje BIGINT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
id_usuario BIGINT( 11 ) NOT NULL,
id_clave_m BIGINT( 11 ) NOT NULL,
id_ip BIGINT( 11 ) NOT NULL,
texto_mensaje TEXT NOT NULL,
tipo_mensaje SMALLINT( 1 ) NOT NULL
) ENGINE = MYISAM;
CREATE TABLE galeria (
id_galeria BIGINT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
id_usuario BIGINT( 11 ) NOT NULL,
id_ip BIGINT( 11 ) NOT NULL,
nombre_galeria VARCHAR( 75 ) NOT NULL,
texto_galeria TEXT NOT NULL
) ENGINE = MYISAM;
CREATE TABLE foto (
id_galeria BIGINT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
id_clave_f BIGINT( 11 ) NOT NULL,
tipo_foto SMALLINT( 1 ) NOT NULL,
visitas_foto INT( 5 ) NOT NULL,
grande_foto LONGBLOB NOT NULL,
alto_foto MEDIUMINT( 3 ) NOT NULL,
ancho_foto MEDIUMINT( 3 ) NOT NULL
) ENGINE = MYISAM;