Sha256: 4777ab46f90c8c7825f503ef8e7dfb470bf792a67f9442b97520b44fbda24d31
Contents?: true
Size: 1.06 KB
Versions: 10
Compression:
Stored size: 1.06 KB
Contents
class CreateSidecarImageTransitions < ActiveRecord::Migration[5.2] def change create_table :sidecar_image_transitions do |t| t.string :to_state, null: false t.text :metadata t.integer :sort_key, null: false t.bigint :solr_document_sidecar_id, null: false t.boolean :most_recent # If you decide not to include an updated timestamp column in your transition # table, you'll need to configure the `updated_timestamp_column` setting in your # migration class. t.timestamps null: false end # Foreign keys are optional, but highly recommended add_foreign_key :sidecar_image_transitions, :solr_document_sidecars add_index(:sidecar_image_transitions, [:solr_document_sidecar_id, :sort_key], unique: true, name: "index_sidecar_image_transitions_parent_sort") add_index(:sidecar_image_transitions, [:solr_document_sidecar_id, :most_recent], unique: true, name: "index_sidecar_image_transitions_parent_most_recent") end end
Version data entries
10 entries across 10 versions & 1 rubygems