Permalink
Browse files

acts-as-list-migrate

The migration generator knows about `acts_as_list`, so you can just
run it and you'll get the new position column on Task.

    $ hobo generate migration

And that's it!
  • Loading branch information...
bryanlarsen authored and iox committed Jun 3, 2013
1 parent 91eb4a3 commit 20fb86d36cdc2c7b6a8f489d5285f8f8cbccdb99
Showing with 11 additions and 1 deletion.
  1. +9 −0 db/migrate/20130109024936_install_acts_as_list.rb
  2. +2 −1 db/schema.rb
@@ -0,0 +1,9 @@
class InstallActsAsList < ActiveRecord::Migration
def self.up
add_column :tasks, :position, :integer
end
def self.down
remove_column :tasks, :position
end
end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130109022053) do
ActiveRecord::Schema.define(:version => 20130109024936) do
create_table "projects", :force => true do |t|
t.string "name"
@@ -54,6 +54,7 @@
t.datetime "created_at"
t.datetime "updated_at"
t.integer "story_id"
t.integer "position"
end
add_index "tasks", ["story_id"], :name => "index_tasks_on_story_id"

0 comments on commit 20fb86d

Please sign in to comment.