Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: rsw686 on March 30, 2008, 02:17:43 PM

Title: [SMF 2b3] Upgrading Database Index Names
Post by: rsw686 on March 30, 2008, 02:17:43 PM
I noticed the upgrade script does not change the database index keynames to the new field naming convention. Not that this is a big deal, just more of an aesthetic issue. Especially since a clean SMF 2 install has them named to the new convention.

The fix would just involve the script dropping and recreating the indexes.
Title: Re: [SMF 2b3] Upgrading Database Index Names
Post by: rsw686 on April 05, 2008, 11:16:56 AM
No one has any thoughts on this?
Title: Re: [SMF 2b3] Upgrading Database Index Names
Post by: metallica48423 on April 05, 2008, 01:00:06 PM
I don't see it causing any problems directly... But nonetheless it is is an inconsistency...

I do see a potential problem with larger boards dropping and recreating the indexes.

Bug #1883: Upgrade script doesn't update index keynames (http://dev.simplemachines.org/mantis/view.php?id=1883)
Title: Re: [SMF 2b3] Upgrading Database Index Names
Post by: Grudge on April 05, 2008, 02:20:32 PM
This was purposely done. Whilst I agree that it would be ideal for them to be the same the problem is MySQL does not support renaming of indexes. If we drop and recreate every index it will cause huge potential upgrade problems for large boards such as this as some indexes take, literally, hours to create.
Title: Re: [SMF 2b3] Upgrading Database Index Names
Post by: rsw686 on April 05, 2008, 02:23:42 PM
Quote from: Grudge on April 05, 2008, 02:20:32 PM
This was purposely done. Whilst I agree that it would be ideal for them to be the same the problem is MySQL does not support renaming of indexes. If we drop and recreate every index it will cause huge potential upgrade problems for large boards such as this as some indexes take, literally, hours to create.

Fair enough. Yeah I could see that being an issue on large boards. Just because I'm anal about these things I'll probably fix my board by hand.

Maybe an option to recreate indexes would be nice with a warning that it may take days to complete. ;)
Title: Re: [SMF 2b3] Upgrading Database Index Names
Post by: metallica48423 on April 05, 2008, 02:39:13 PM
Understood.  Bug tracked it to ensure that it was seen :) 

I closed the bug report to reflect the decision on it.

Thanks Grudge