Sha256: b423cf24a3d39fc8db4007e95bd1a7b132174e350d20ae26147a2bd3e9d17749

Contents?: true

Size: 527 Bytes

Versions: 197

Compression:

Stored size: 527 Bytes

Contents

class CreateMessageTransitions < ActiveRecord::Migration
  def change
    create_table :message_transitions do |t|
      t.string :to_state
      if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
        t.text :metadata
      else
        t.text :metadata, default: "{}"
      end
      t.integer :sort_key
      t.integer :message_id
      t.timestamps
    end

    add_index :message_transitions, :message_id
    add_index :message_transitions, [:sort_key, :message_id], unique: true
  end
end

Version data entries

197 entries across 190 versions & 20 rubygems

Version Path
enju_library-0.2.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.2.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.2.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_seed-0.2.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_seed-0.2.0.beta.7 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.2.0.beta.10 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.2.0.beta.5 db/migrate/20140518111006_create_message_transitions.rb
enju_event-0.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_inter_library_loan-0.2.0.beta.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_ndl-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_subject-0.2.0.beta.5 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_search_log-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_news-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_grid-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_inventory-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_nii-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_oai-0.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb