• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERXMigrationDatabase and postUpgrade
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXMigrationDatabase and postUpgrade


  • Subject: Re: ERXMigrationDatabase and postUpgrade
  • From: Sanford Selznick <email@hidden>
  • Date: Sat, 11 Apr 2009 08:57:57 -0700

At 7:50 AM -0700 4/11/09, Mike Schrag wrote:
one is that your model will change over time and the constant you refer to in migration0 might not exist in a month, so it would stop compiling.

I _want_ the compiler error. I'd much rather get a compiler error than a runtime error.
No you don't :)

Well, not for this at least ... the point of migrations is that things change. if you ever delete a column from your database you would break HISTORICAL state. this is the same reason why you can't touch anything related to an EOModel inside your migration method, because your EOModel and java files always only ever match LATEST state, but you have to be able to migrate from old state that no longer matches the latest models and java files. If you remove a column in version 3, you would break your version 1 where it existed, which is incorrect -- you would be changing history. You have to be able to play back db changes exactly as they were regardless of the current state of your models.

An excellent point. And since migration code is machine generated, chance for error is reduced too. This is definitely an exception to my "string constants are bad" rule. :-)


Best,
  Sanford
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >ERXMigrationDatabase and postUpgrade (From: Sanford Selznick <email@hidden>)
 >Re: ERXMigrationDatabase and postUpgrade (From: David Avendasora <email@hidden>)
 >Re: ERXMigrationDatabase and postUpgrade (From: Mike Schrag <email@hidden>)
 >Re: ERXMigrationDatabase and postUpgrade (From: Sanford Selznick <email@hidden>)
 >Re: ERXMigrationDatabase and postUpgrade (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: ERXMigrationDatabase and postUpgrade
  • Next by Date: EOGeneration and inner types
  • Previous by thread: Re: ERXMigrationDatabase and postUpgrade
  • Next by thread: [MEET] Chicago CocoaHeads / CAWUG Tuesday 4/14
  • Index(es):
    • Date
    • Thread