Sha256: 3ec7cdf7a8ef422c8796d4e58f6f0b09ceffa01e03212cc36e8b7c64ae6ae475
Contents?: true
Size: 325 Bytes
Versions: 1
Compression:
Stored size: 325 Bytes
Contents
class AddProjectIdToTasks < ActiveRecord::Migration def up add_column :tasks, :project_id, :integer execute "UPDATE tasks SET project_id=tickets.project_id FROM tickets WHERE ticket_id=tickets.id" change_column_null :tasks, :project_id, false end def down remove_column :tasks, :project_id end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
houston-core-0.5.0.beta1 | db/migrate/20140824194031_add_project_id_to_tasks.rb |