Sha256: 1df81667163a1c01cc6f1d19a2c849c1e5d01c7a46f65f7a9b5a14365bbd391e

Contents?: true

Size: 747 Bytes

Versions: 256

Compression:

Stored size: 747 Bytes

Contents

class CreateResourceImportFileTransitions < ActiveRecord::Migration
  def change
    create_table :resource_import_file_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 :resource_import_file_id
      t.timestamps
    end

    add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id"
    add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id"
  end
end

Version data entries

256 entries across 248 versions & 19 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_seed-0.2.0/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_seed-0.2.1/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_manifestation_viewer-0.2.0/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_library-0.2.2 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_seed-0.2.1 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_biblio-0.2.1 db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_library-0.2.1 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_circulation-0.2.1 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_inventory-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_bookmark-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_loc-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_manifestation_viewer-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_circulation-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_message-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_event-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_oai-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb
enju_nii-0.2.0 spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb