Reputation: 37118
I checked the docs but it didn't say anything much about it, weirdly.
If I call db.create_all()
, does there need to be some sort of check as to whether the database already exists, lest it be overwritten?
Upvotes: 3
Views: 2489
Reputation: 174748
The method only creates tables; so it is up to you to make sure the database is already created.
The database has to exist and if the table already exists, you'll receive an error from the database. It will not overwrite or delete tables.
Upvotes: 5