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_event-0.1.17.pre25 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.1.0.pre43 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0.pre65 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_bookmark-0.1.2.pre21 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.1.0.pre42 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_event-0.1.17.pre24 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.1.14.pre22 db/migrate/20140518111006_create_message_transitions.rb
enju_ndl-0.1.0.pre35 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.1.0.pre40 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0.pre64 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.1.0.rc17 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.1.14.pre21 db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.1.0.rc16 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.1.0.pre41 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.1.14.pre20 db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.1.0.pre39 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0.pre63 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb