Skip to content

DB schema not created with additional fields #1102

Answered by frankie567
bert2002 asked this question in Q&A
Discussion options

You must be logged in to vote

Did your table was created before you added the column? Is so, it's expected: create_db_and_tables is not able to modify existing tables. Try to start from an empty database and it should correctly create all the columns.

If you need a proper migration system for your SQL database, you should have a look at Alembic: https://alembic.sqlalchemy.org/en/latest/

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@bert2002
Comment options

@frankie567
Comment options

@bert2002
Comment options

Answer selected by bert2002
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1101 on October 23, 2022 07:40.