terreus
terreus

Reputation: 525

Does adding new SQLAlchemy.model will be automatically added to my database?

If I'm going to add another SQLAlchemy model, does it automatically be added to my database? Do I need to run some commands for it to be added or checked?

Upvotes: 1

Views: 77

Answers (1)

Tim Thompson
Tim Thompson

Reputation: 311

It will only be added if you run the db.create_all() command again.

If your model is going to be changing frequently it might be worth getting to grips with something like Flask-Migrate which can handle database migrations really nicely.

Upvotes: 2

Related Questions