Best practise for schema evolution

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Best practise for schema evolution

p.stiernstrom
Hello everyone!

I'm pretty new to glorp but I'm keeping at it even though it's frustrating at times. I recently gave up on mapping from one class to a polymorphic one using the HorizontalTypeResolver as it just wouldn't work. The Filtered resolver does however work fine. The horizontal one didn't write the foreign keys as expected.

So as I settled for the Filtered resolver I started realizing that I will have to be able to evolve the database schema to account for new types. I ran across some code in GlorpSession that seems like it's intended to do the job, namely: migrateFromSystem:toSystem. There is also migrateFromVersion:toVersion: but in my image the definition is just to halt.

I was thinking about using updateTableFrom:to: but as i attempted to get my table from my descriptor: MyDescriptor new tabledNamed: 'TABLE' I just had an error saying that serial was sent to nil and in the debugger it seems that platform evaluates to nil. So...I'm not sure how to work with this.

Is there anything written somewhere about how to do schema evolution using glorp? It seems like a problem anyone would run into pretty early on.

All the best,

Peter

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.