python - 在flask-sqlalchemy中执行db upgrade数据库迁移时,报错一个表已经存在?
PHPz
PHPz 2017-04-18 09:51:23
0
2
517

sqlalchemy.exc.OperationalError: (OperationalError) (1050, "Table 'pcoip_model' already exists") 'nCREATE TABLE pcoip_model (ntid INTEGER NOT NULL AUTO_INCREMENT, ntitems VARCHAR(64), ntitems_values VARCHAR(64), ntPRIMARY KEY (id)n)nn' ()

PHPz
PHPz

学习是最好的投资!

reply all(2)
迷茫

Just delete the table from the database
or try again

db init 
db migrate
db upgrade
迷茫

Don’t use flask-migrate. Nine times out of ten, something will go wrong. Manually modifying the database and migrating data is the most reliable method.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template