pinnymz / migration_comments

Comments for your migrations
MIT License
173 stars 31 forks source link

Support Rails 5 #27

Closed 42thcoder closed 8 years ago

42thcoder commented 8 years ago

It seems not working on rails-5.0.0.beta1.1.

Here is a migration:

class CreateFormulas < ActiveRecord::Migration[5.0]
  def change
    create_table :formulas, comment: 'formula of truth' do |t|
      t.string :name, comment: 'name of formula'
      t.string :code, comment: 'ident'
      t.string :equation, comment: 'equation of formula'

      t.timestamps
    end
  end
end

And after run rails db:migration, here is what I got from db/schema.rb:


create_table "formulas", id: false, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='formula of truth'", comment: "formula of truth" do |t|
  t.integer  "id"
  t.string   "name"
  t.string   "code"
  t.string   "equation"
  t.datetime "created_at", null: false
  t.datetime "updated_at", null: false
end
pinnymz commented 8 years ago

This is being addressed as part of #30 and/or Rails 5 itself (see conversation in #28).