Sha256: 950ecececaab50be52e031d1da5e7c872885c479f5fe8ed803c1b30fe778431f
Contents?: true
Size: 607 Bytes
Versions: 2
Compression:
Stored size: 607 Bytes
Contents
class AddWorkEffortToWorkEffortAssignment < ActiveRecord::Migration def change unless columns(:work_effort_assignments).collect {|c| c.name}.include?('work_effort_id') add_column :work_effort_assignments, :work_effort_id, :integer # migrate data execute "UPDATE work_effort_assignments SET work_effort_assignments.work_effort_id=work_efforts.work_effort_assignment_id FROM work_effort_assignments JOIN work_efforts ON work_effort_assignments.id=work_efforts.work_effort_assignment_id" remove_column :work_efforts, :work_effort_assignment_id end end end
Version data entries
2 entries across 2 versions & 1 rubygems