dbDelta ALTER TABLE syntax?
Due to some changes in the DB, I need to alter a table to add one column to it, but even though the function is running, the table isn't altered. Here's the ALTER TABLE code that I've written
$sql = "ALTER TABLE " . $packagetable . " ADD COLUMN price decimal(14,2) NOT NULL AFTER description;";
dbDelta($sql);
I couldn't find the syntax for ALTER TABLE with dbDelta anywhere online. EDIT: After looking at the ALTER TABLE statement in gravity forms plugin, I have updated the statement in single line.
Topic dbdelta plugin-development Wordpress
Category Web