I’m looking for something like this:
class Foo
include Model
field id, serial
field name, Text
end
migrate
now migrate should write these two files:
migrations/scheme1.rb # current representation of the scheme
migrations/migration1.rb # migrate up to get database into scheme1
state.
Then when adding a value
class Foo
[…]
field city, Text # << new
end
then migrate should diff migration/scheme1.rb with what the code
contains and write
migrations/scheme2.rb
migrations/migration2.rb
and let me review/edit migration2 before it gets run.
Does such a library already exist in some way?
Marc W.