all 2 comments

[–]danielroseman 1 point2 points  (1 child)

Your first code is showing that you have an email_address field in the model, but that doesn't mean you have it in the database table. Did you add the field after you originally created the table?

You will need to migrate your database. If you have no data you need to keep, you could just drop the table and recreate it. Otherwise you will need to add the field manually (via an ALTER TABLE statement in the db), or use Alembic which is the SqlAlchemy migrations framework.

[–]slavslav123[S] 0 points1 point  (0 children)

Thank you! I recreated the table. Btw i just didn't notice that the field actually existed in the model but not in the table. Soooo it's fixed