Sha256: 54ff0da60602bbb218b506066c870d42135efda3c97e61ace9398c794782d771

Contents?: true

Size: 455 Bytes

Versions: 7

Compression:

Stored size: 455 Bytes

Contents

class AddStateToTimelineObjects < ActiveRecord::Migration
  def self.up
    add_column :comments, :state, :string, limit: 16, null: false, default: "Expanded"
    add_column :emails,   :state, :string, limit: 16, null: false, default: "Expanded"
    execute("UPDATE comments SET state='Expanded'")
    execute("UPDATE emails   SET state='Expanded'")
  end

  def self.down
    remove_column :comments, :state
    remove_column :emails,   :state
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.14.1 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.15.0.beta.2 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.15.0.beta db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.14.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb
reduced_fat_crm-0.15.0.beta db/migrate/20100928030626_add_state_to_timeline_objects.rb
reduced_fat_crm-0.14.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb