Hey Sohail, 2010/7/19 Sohail Somani <[email protected]>: > I was doing something similar before when I would hand write my SQL. I > guess I'll still be doing that! I heard the Ruby people have some sort > of tool that helps them migrate the schemas. > > Here is the Ruby thing I was thinking of: > > http://www.oracle.com/technology/pub/articles/kern-rails-migrations.html > > I do something similar to what you do when I hand-write my SQL. Perhaps > it is possible to define a mini-framework for data migration.
I like the Rails approach to migrations -- I think something like this for Wt::Dbo would be really nice, as an alternative to createTables() / dropTables(). The one thing to realize is that the migrations feature of Rails is entirely separate from the actual ORM: there is nothing in Ruby's migration framework that somehow maintains consistency between the migrations and the schema used by the ORM. As such, a good schema migration tool could and should be not connected to a particular ORM framework at all, and if were not because of SQL dialects, it could just as well be done in SQL. The three features you need for a migration framework are (IMHO): - defining a schema version which can be stored as well in the database (and that's easy) - choosing an API in which upgrade and downgrade scripts are specified, preferably something that has a syntax that is either known or easy familiarized with (that's the creative part) - implementing a small tool that applies different migrations sequentially, to upgrade or downgrade (that's easy too) Perhaps someone has a good idea/experience with an existing solution? Regards, koen ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
