Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Mysql »

Error en Create Table

Estas en el tema de Error en Create Table en el foro de Mysql en Foros del Web. Pues resulta que he tenido problemas con mi ordpress, y me he visto obligado a restaurar la base de datos. Hice un backup pero cual ...
  #1 (permalink)  
Antiguo 29/05/2007, 14:43
Avatar de yournightmare86  
Fecha de Ingreso: abril-2006
Ubicación: Madrid
Mensajes: 875
Antigüedad: 18 años
Puntos: 9
Error en Create Table

Pues resulta que he tenido problemas con mi ordpress, y me he visto obligado a restaurar la base de datos. Hice un backup pero cual es mi sorpresa que me da error al tratar de crear una tabla:
Código:
CREATE TABLE b18_331576_wordpressbd_posts(
ID bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
post_author bigint( 20 ) DEFAULT '0' NOT NULL ,
post_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL ,
post_date_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL ,
post_content longtext NOT NULL ,
post_title text NOT NULL ,
post_category int( 4 ) DEFAULT '0' NOT NULL ,
post_excerpt text NOT NULL ,
post_status enum( 'publish', 'draft', 'private', 'static', 'object', 'attachment', 'inherit', 'future' ) DEFAULT 'publish' NOT NULL ,
comment_status enum( 'open', 'closed', 'registered_only' ) DEFAULT 'open' NOT NULL ,
ping_status enum( 'open', 'closed' ) DEFAULT 'open' NOT NULL ,
post_password varchar( 20 ) NOT NULL ,
post_name varchar( 200 ) NOT NULL ,
to_ping text NOT NULL ,
pinged text NOT NULL ,
post_modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL ,
post_modified_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL ,
post_content_filtered text NOT NULL ,
post_parent bigint( 20 ) DEFAULT '0' NOT NULL ,
guid varchar( 255 ) NOT NULL ,
menu_order int( 11 ) DEFAULT '0' NOT NULL ,
post_type varchar( 20 ) DEFAULT 'post' NOT NULL ,
post_mime_type varchar( 100 ) NOT NULL ,
comment_count bigint( 20 ) DEFAULT '0' NOT NULL ,
PRIMARY KEY ( ID ) ,
KEY post_name( post_name ) ,
KEY type_status_date( post_type, post_status, post_date, ID ) ,
KEY post_related( post_name, post_content )
);
El error es el siguiente:
Código:
 MySQL ha dicho: Documentación
#1170 - BLOB/TEXT column 'post_content' used in key specification without a key length
Alguién puede echarme una mano? Temo haberme cargado 89 posts de mi blog:S.

Gracias y saludos.
  #2 (permalink)  
Antiguo 31/05/2007, 09:30
Avatar de Mithrandir
Colaborador
 
Fecha de Ingreso: abril-2003
Mensajes: 12.106
Antigüedad: 21 años
Puntos: 25
Re: Error en Create Table

Te muevo al foro de MySQL, aqui seguramente encontrarán tu pregunta con mucho más sentido.

Viene de DB generales.
__________________
"El hombre, en su orgullo, creó a Dios a su imagen y semejanza."
Friedrich Nietzsche
  #3 (permalink)  
Antiguo 02/06/2007, 05:51
Avatar de yournightmare86  
Fecha de Ingreso: abril-2006
Ubicación: Madrid
Mensajes: 875
Antigüedad: 18 años
Puntos: 9
Re: Error en Create Table

Gracias por trasladar el tema. De todas formas conseguí solucionarlo, dejo mi solución por si a alguién le sirve.
Simplemente borré toda la base de datos(teniendo el script de creación de toda ella logicamente), volví a instalar wordpress(es decir corrí el install.php) con lo que ya la estructura de tablas se encontraba creada. Luego simplemente ejecuté de nuevo todo el script excepto el create table de la tabla que me daba error(la del post de arriba) dejando todos los inserts, y funcionó.

Saludos.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:04.