/testing-sqlalchemy-after-create-event

The prototype app in Flask that uses 'after-create' event from SQLAlchemy to insert default values into database after its creation.

Primary LanguagePython

Testing SQLAlchemy 'after_create' event in a Flask application

The prototype of a Flask app, that uses plain SQLAlchemy models with the Flask-SQLAlchemy session. It was created to test 'after_create' event from SQLAlchemy event API. The app uses it to insert initial values just once after database creation.

The app inserts into priority table values: high, medium, low. It ilustrates the graphics below.

I presented more detailed description in the DZONE article: https://dzone.com/articles/how-to-initialize-database-with-default-values-in