Sha256: 423d92999d2195fcc3714c6ddf59e92880526e9b8a81f7a54799ebd6e4ab96a7

Contents?: true

Size: 531 Bytes

Versions: 38

Compression:

Stored size: 531 Bytes

Contents

class CreateMessageTransitions < ActiveRecord::Migration[4.2]
  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, %i[sort_key message_id], unique: true
  end
end

Version data entries

38 entries across 38 versions & 3 rubygems

Version Path
enju_biblio-0.3.18 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.17 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.16 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.15 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.3.6 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.14 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.13 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.3.5 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.12 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.11 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_question-0.3.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.3.4 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.10 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.10.rc.3 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.10.rc.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.3.4.rc.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.10.rc.1 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.9 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.3.4.rc.1 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.3.8 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb