Cannot complete Flask-Migration

后端 未结 8 2143
刺人心
刺人心 2021-02-02 13:27

I\'ve setup a local Postgres DB with SQLAlchemy and cannot commit my first entry. I keep on getting this error...

ProgrammingError: (ProgrammingError) relation          


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-02 13:50

    I had the same issue. According to the version in alembic_version table in db, migration action is looking for that version in /migrations/versions folder which has already been deleted. Therefore solution is to delete alembic_version table: If you are using sqlite, 1. Open your xxx.sqlite db file. sqlite3 xxx.sqlite 2. check tables .tables 3. you will see alembic_version, delete it DROP TABLE alembic_version

提交回复
热议问题