ScotterMonk / scottswain

This project is in support of efforts to hire python engineers.
MIT License
0 stars 0 forks source link

Issue 10-Add Database Mgmt Tips to Readme #16

Closed ScotterMonk closed 1 month ago

ScotterMonk commented 1 month ago

Database Management & Install Tips

Some tips on managing the SQLite database in the beginning and any time the database structure is changed in the models.py file.

Workflow

Initialization

To initialize the SQLite database, you'll need to use Flask-Migrate:

After following these steps, your SQLite database should be initialized and ready to use. The tables defined in your models.py file will be created in the database.

Upkeep

Whenever you make changes to your models, you'll need to create a new migration and apply it:

flask db migrate -m "Description of changes"
flask db upgrade

Once you update models.py file with any schema changes: