If i add a column to the wp_posts table in wordpress may i have problems in upgrade of wordpress??
+3
A:
Worpdress supports several mechanisms for plugins to store information in the database
- Store site wide options
- Store Post Meta
- Custom tables
The article Creating Tables with Plugins mentions a dbDelta function that is used for updating tables. The discussion focuses on how the function can be used to upgrade versions of custom tables but it's probably used for the upgrade of wordpress itself.
Because of this, adding a column to wp_posts will probably not cause a problem for upgrades but may cause problems for the upgrade but probably would remove your column! I'd recommend using one of the options available.
Robert Christie
2010-01-14 14:19:27
+1 for other options, but I think dbDelta *would* cause a problem - last time I looked, it compared two tables and generated the sql to bring the structure of both inline. I believe this would remove the additional column.
adam
2010-01-14 14:23:21
@adam: Thanks for the tip - updated answer.
Robert Christie
2010-01-14 14:43:20