pony
pony copied to clipboard
ERDiagramError: Cannot define entity 'Car': database mapping has already been generated
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?
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.