Seite 1 von 1

Can't DROP 'post_username'; check that column/key exists

Verfasst: 08.05.2010 11:52
von patti2005
Hallo,

ich bin gerade dabei meine db von mysql 4 auf mysql 5.1 umzustellen und der mysql_upgrader.php klappt so weit auch ganz gut bis auf das hier :

Code: Alles auswählen

# Table: 'phpbb_posts'
ALTER TABLE phpbb_posts
MODIFY post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
MODIFY topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY poster_ip varchar(40) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY post_username varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
MODIFY post_text mediumtext NOT NULL COLLATE utf8_bin,
MODIFY post_checksum varchar(32) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY bbcode_bitfield varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY bbcode_uid varchar(8) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
MODIFY post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_edit_reason varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin,
MODIFY post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
MODIFY post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
DROP INDEX post_username,
ADD KEY post_username (post_username),
DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
dann erfolgt :

Code: Alles auswählen

Fehler

SQL-Befehl:

ALTER TABLE phpbb_posts MODIFY post_id mediumint(8) UNSIGNED NOT NULL auto_increment, MODIFY topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, MODIFY forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, MODIFY poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, MODIFY icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, MODIFY poster_ip varchar(40) DEFAULT '' NOT NULL COLLATE utf8_bin, MODIFY post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, MODIFY post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, MODIFY post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, MODIFY enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, MODIFY enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, MODIFY enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, MODIFY enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, MODIFY post_username varchar(255) DEFAULT '' NOT NULL COLLATE utf8_bin, MODIFY post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, MODIFY[...]

MySQL meldet: Dokumentation
#1091 - Can't DROP 'post_username'; check that column/key exists 
hat dort jemand eine loesung ?

Re: Can't DROP 'post_username'; check that column/key exists

Verfasst: 08.05.2010 19:15
von Balint
Hi,

entferne einfach folgende Zeile aus dem Statement, dann sollte es klappen:

Code: Alles auswählen

DROP INDEX post_username,

Viele Grüße,
Bálint

Re: Can't DROP 'post_username'; check that column/key exists

Verfasst: 10.05.2010 11:34
von patti2005
Balint hat geschrieben:Hi,

entferne einfach folgende Zeile aus dem Statement, dann sollte es klappen:

Code: Alles auswählen

DROP INDEX post_username,

Viele Grüße,
Bálint
Hi,

ich danke dir, das war die loesung, hoffe das es auch nicht unbedingt wichtig und noetig ist.

Gruss und danke.