Sha256: d26a7517ea35f1732a4118f228d5adff58fbbff23a205746f20cb6b09eb761cc

Contents?: true

Size: 491 Bytes

Versions: 13

Compression:

Stored size: 491 Bytes

Contents

# frozen_string_literal: true

class AddStateToTimelineObjects < ActiveRecord::Migration[4.2]
  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

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.22.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.21.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.20.1 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.20.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.19.2 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.19.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.18.2 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.17.3 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.18.1 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.18.0 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.17.2 db/migrate/20100928030626_add_state_to_timeline_objects.rb
fat_free_crm-0.17.1 db/migrate/20100928030626_add_state_to_timeline_objects.rb