search for: 002_add_deleted_at_to_options

Displaying 1 result from an estimated 1 matches for "002_add_deleted_at_to_options".

2008 Feb 13
4
Migration Issues: Can't update newly added column values
...lass CreateOptions < ActiveRecord::Migration def self.up create_table :options do |t| t.string :name t.boolean :is_deleted, :default => false, :null => false t.timestamps end end def self.down drop_table :options end end ---------- bugtest/db/migrate/002_add_deleted_at_to_options.rb <--- Upgrade migration that doesn''t completely work ---------- class AddDeletedAtToOptions < ActiveRecord::Migration # Create temp model to use... class Option < ActiveRecord::Base; end # # Add `deleted_at` column, set to Time.now if `is_deleted` is true, # then rem...