Sha256: f74d4dd9677ab8b8d70029fb881c2411404aa025035b29716a081c372d22b5f3

Contents?: true

Size: 644 Bytes

Versions: 256

Compression:

Stored size: 644 Bytes

Contents

class CreateImportRequestTransitions < ActiveRecord::Migration
  def change
    create_table :import_request_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 :import_request_id
      t.timestamps
    end

    add_index :import_request_transitions, :import_request_id
    add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id"
  end
end

Version data entries

256 entries across 248 versions & 19 rubygems

Version Path
enju_bookmark-0.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_subject-0.2.2 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_circulation-0.2.3 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_message-0.2.2 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_biblio-0.2.3 db/migrate/20140519171220_create_import_request_transitions.rb
enju_library-0.2.3 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_seed-0.2.2 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_ndl-0.2.3 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_ndl-0.2.2 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_grid-0.2.0 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_biblio-0.2.2 db/migrate/20140519171220_create_import_request_transitions.rb
enju_manifestation_viewer-0.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_circulation-0.2.2 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_ndl-0.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_event-0.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_message-0.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_subject-0.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_biblio-0.2.1/db/migrate/20140519171220_create_import_request_transitions.rb
enju_leaf-1.2.1 spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb