Sha256: 033752de235986b08e032f6c9d44388ee12de28e4d146bc5b8947b0461a63898
Contents?: true
Size: 939 Bytes
Versions: 123
Compression:
Stored size: 939 Bytes
Contents
class AddTaskCreatedAt < ActiveRecord::Migration def self.up add_column :tasks, :created_at, :datetime Task.find(:all).each do |task| task.created_at = task.period.start_on task.save end remove_column :tasks, :estimate remove_column :tasks, :assigned_to change_column :tasks, :initial_estimate, :decimal, :precision => 6, :scale => 2, :null => false change_column :works, :todo, :decimal, :precision => 6, :scale => 2, :null => false, :default => 1 change_column :works, :hours, :decimal, :precision => 6, :scale => 2, :null => false, :default => 0 end def self.down remove_column :tasks, :created_at add_column :tasks, :estimate, :time add_column :tasks, :assigned_to, :integer change_column :tasks, :initial_estimate, :integer, :null => false change_column :works, :todo, :integer, :null => false change_column :works, :hours, :integer, :null => false end end
Version data entries
123 entries across 123 versions & 1 rubygems