[PonyORM-list] Changing schema during development?
Tobiah
toby at tobiah.org
Tue Oct 3 15:15:35 UTC 2017
On 10/02/2017 08:36 PM, Alexander Kozlovsky wrote:
>> Is it not possible to let the database drive the structure and
>> dynamically create the entity classes somehow based on
>> introspection of
> the database?
>
> Yes. At this moment, Pony does not have an official way to introspect
> a database and reconstruct entities from the database. Typically, a
> database does not contain enough information to fully restore entity
> classes anyway.
I guess I was thinking that I could generate the Entity classes myself,
doing my own introspection. I just wasn't sure how sewing together
a class programmatically in python would look.
My perspective is a bit different than most. My company has at
any time around 100 active databases for different events. The
structures are similar, but change individually all the time.
"Oh, you have this extra piece of information for this event? Just
stuff it in a new field or new table if it's more convenient". The
application code for that event then accommodates the new information
storage. The thing is, at the ORM level, I would like to have one
piece of code that works for all of the events. That's why the
introspection idea is important to me.
Thanks,
Tobiah
More information about the ponyorm-list
mailing list