http://github.com/camping/camping/issues#issue/12

This is probably the most exciting issue: Making migrations less sucky.

The fact that you'll have to do this to get started sucks:

module Nuts::Models
  class Page < Base
  end

  class BasicFields < V 1.0
    def self.up
      create_table Page.table_name do |t|
        t.string :title
        t.text   :content
        # This gives us created_at and updated_at
        t.timestamps
      end
    end

    def self.down
      drop_table Page.table_name
    end
  end
end

It should really just be something like this:

module Nuts::Models
  class Page < Base
    t.string :title
    t.text  :content
    t.timestamps
  end
end

But we still want to support regular migrations (in some way at
least). See the issue for more examples/comments.

// Magnus Holm
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to