MyBB Community Forums

Full Version: $db->add_column and $db->drop_column
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Currently these do not check if a column actually exists before executing the query.  This can lead to ugly SQL errors.  If we change these so the field_exists method is called first, we can verify if the query should run and if not, just simply not execute it.  This also reduces the amount of code plugin authors have to use.
(2014-11-07, 10:00 PM)dragonexpert Wrote: [ -> ]Currently these do not check if a column actually exists before executing the query.  This can lead to ugly SQL errors.  If we change these so the field_exists method is called first, we can verify if the query should run and if not, just simply not execute it.  This also reduces the amount of code plugin authors have to use.


good idea
I don't see why not.

EDIT: maybe except the fact that we'd end up with many duplicaste checks in plugins etc.