Common Columns in Multiple Models #1306
Unanswered
stealthco-tony
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This is better answered as a question to sqlalchemy, flask-sqlalchemy doesn't affect it. Search their docs for "abstract" or "mixin". |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In our database, we will need several fields that are common in each table. Things like "created_date", "last_updated_date", "is_active", "approved". We will have several hundred tables in our database. How can we easily create a "common_model.py" file and then import / merge all those fields with the fields specific to each table?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions