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_loc-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_bookmark-0.2.0.beta.5 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_question-0.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_purchase_request-0.2.0.beta.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_news-0.2.0.beta.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_subject-0.2.0.beta.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.2.0.beta.4 db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.2.0.beta.9 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_seed-0.2.0.beta.6 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_bookmark-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.2.0.beta.8 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.2.0.beta.7 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.2.0.beta.6 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_event-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.2.0.beta.3 db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.2.0.beta.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.2.0.beta.5 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_ndl-0.2.0.beta.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb