Use AR version for migrations
This commit is contained in:
parent
1ef5c17c41
commit
5b764e796e
|
@ -1,4 +1,4 @@
|
|||
class AASMCreate<%= table_name.camelize %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
||||
class AASMCreate<%= table_name.camelize %> < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
||||
def change
|
||||
create_table(:<%= table_name %>) do |t|
|
||||
t.string :<%= column_name %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Add<%= column_name.camelize %>To<%= table_name.camelize %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
||||
class Add<%= column_name.camelize %>To<%= table_name.camelize %> < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
||||
def change
|
||||
add_column :<%= table_name %>, :<%= column_name %>, :string
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue