elkarte / Elkarte

ElkArte Forum. A free, open source, modern discussion forum / BB
https://elkarte.github.io/Elkarte/
BSD 3-Clause "New" or "Revised" License
175 stars 61 forks source link

db_create_table if exists => update #2118

Open emanuele45 opened 9 years ago

emanuele45 commented 9 years ago

I think db_create_table may take advantage of a new action in case the table exists. At the moment the options are basically: drop&replace and ignore (returning true or false depending if we want to know the table is there or not). An "update" able to add missing columns would probably be very handy. Of course it would be asymmetric because I wouldn't remove columns without specific instructions, but it would cut down in case of updates.

Spuds commented 9 years ago

:+1: