pony icon indicating copy to clipboard operation
pony copied to clipboard

ERDiagramError: Cannot define entity 'Car': database mapping has already been generated

Open ArbaazAli1 opened this issue 2 years ago • 1 comments

I was following this tutorial https://docs.ponyorm.org/firststeps.html created the person entity but forgot to create the Car entity, and went on to run db.bind (to my Postgres db) and db.generate_mapping now I am stuck in a loop because I cannot create a new entity, and cannot edit the person entity(that was already created) what could be the possible way around?

ArbaazAli1 avatar Jul 26 '22 12:07 ArbaazAli1

Hello. What are you talking about is migration. You can either recreate all entities (drop all tables) or try to migrate by your own (with raw sql). Pony doesn't support migrations yet.

sashaaero avatar Aug 02 '22 14:08 sashaaero