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_bookmark-0.1.2 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.1.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_ndl-0.1.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_event-0.1.17 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.1.14 db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.1.0 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_bookmark-0.1.2.pre23 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_ndl-0.1.0.pre38 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.1.0.pre45 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0.pre71 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_event-0.1.17.pre27 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_message-0.1.14.pre26 db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.1.0.pre49 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.1.0.rc22 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_library-0.1.0.pre44 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0.pre70 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_leaf-1.1.0.rc21 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_circulation-0.1.0.pre48 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb
enju_biblio-0.1.0.pre69 spec/dummy/db/migrate/20140518111006_create_message_transitions.rb