ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SQL issue after ALTER TABLE failed

January 31, 2011 12:27pm

Subscribe [3]
  • #1 / Jan 31, 2011 12:27pm

    JCDerrick

    57 posts

    We recently moved to a new host and we accidentally left the ALTER permissions off the db.

    I found out because when I created a new custom field, it gave me an error but then seemingly created the new custom field anyway. Now when I try and delete the custom field, I get this error:

    MySQL ERROR:
    Error Number: 1091
    Description: Can’t DROP ‘field_id_115’; check that column/key exists
    Query: ALTER TABLE exp_weblog_data DROP COLUMN field_id_115

    How can we delete this field from the database? I assume we’ll need to go into phpmyadmin, but I’m not exactly sure what I need to delete.

    Currently I cannot update any posts that contain this custom field bc it doesn’t actually seem to exist.

    Thanks,
    John

  • #2 / Feb 01, 2011 8:45am

    Sue Crocker

    26054 posts

    Hi, John. First things first. Make a backup copy of your exp_weblog_data table. Then inside of PHPMyAdmin do a

    DESC exp_weblog_data

    Is there a field_id_115? What about a field_ft_115?

  • #3 / Feb 01, 2011 8:59am

    JCDerrick

    57 posts

    Hi Sue, I made a backup and then went into phpmyadmin and did the following:

    DELETE FROM `my***db`.`exp_weblog_fields` WHERE `exp_weblog_fields`.`field_id` = 115

    That appears to have gotten everything back to normal. I guess part of the field was created when ALTER wasn’t turned on, and that’s why EE was having trouble deleting it; bc it only existed in the exp_weblog_fields and not in the exp_weblog_data table.

    By deleting the exp_weblog_fields entry 115 that appears to have worked. The field is now gone from my Custom Fields area and I can update entries again without any issues.

    Thanks for your help.

    -John

  • #4 / Feb 01, 2011 6:12pm

    Ingmar

    29245 posts

    I am very glad to see Sue was able to help. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases