Wt::Dbo::Session::createTables may fail to create a table if another table already exists
The following does not create "table1" if "table2" already exists.
Wt::Dbo::backend::MySQL mysql(...) ;
Wt::Dbo::Session session ;
Updated by Koen Deforche almost 7 years ago
- Status changed from New to Feedback
That's indeed the intended behavior. createTables() cannot handle migrations of an existing database. So as soon as it detects that it cannot simply create the whole schema it will rollback, assuming that the current schema is correct. Typically you need a migration script for migrating older versions of your database schema if you've made changes to it.