Sha256: 5f17a78cfcc160644bb1b35022ee318c36b53a52c99317b8c199104ea3ee1138
Contents?: true
Size: 872 Bytes
Versions: 16
Compression:
Stored size: 872 Bytes
Contents
# frozen_string_literal: true # This migration and AddTransactionIdColumnToVersions provide the necessary # schema for tracking associations. class CreateVersionAssociations < ActiveRecord::Migration[5.2] def self.up create_table :version_associations do |t| t.integer :version_id t.string :foreign_key_name, null: false t.integer :foreign_key_id t.string :foreign_type, null: false end add_index :version_associations, [:version_id] add_index :version_associations, [:foreign_key_name, :foreign_key_id, :foreign_type], name: "index_version_associations_on_foreign_key" end def self.down remove_index :version_associations, [:version_id] remove_index :version_associations, name: "index_version_associations_on_foreign_key" drop_table :version_associations end end
Version data entries
16 entries across 16 versions & 1 rubygems