Sha256: 4e8afdfe5efc0389ce4bff02936eece90ddea8360011a4491862a83ffd5ff0ca

Contents?: true

Size: 245 Bytes

Versions: 1

Compression:

Stored size: 245 Bytes

Contents

class TasksBelongsToTaskable < ActiveRecord::Migration
  def change
    rename_column :flyboy_tasks, :goal_id, :taskable_id
    add_column :flyboy_tasks, :taskable_type, :string
    Flyboy::Task.update_all(taskable_type: Flyboy::Goal)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flyboy-1.1.0 db/migrate/20150525081421_tasks_belongs_to_taskable.rb