Sha256: a3a67fdcaad915d1af205eaaf45581e9ccb7c06c782e1730316bc8ed4bf1137d
Contents?: true
Size: 809 Bytes
Versions: 15
Compression:
Stored size: 809 Bytes
Contents
module Bulkrax class Entry < ApplicationRecord belongs_to :importer end end class ChangeImporterAndExporterToPolymorphic < ActiveRecord::Migration[5.1] def change begin # deal with odd bug around foreign keys in ci remove_foreign_key :bulkrax_entries, column: :importer_id if foreign_key_exists?(:bulkrax_entries, column: :importer_id) rescue ArgumentError # do nothing end remove_index :bulkrax_entries, :importer_id if index_exists?(:bulkrax_entries, :importer_id) rename_column :bulkrax_entries, :importer_id, :importerexporter_id if column_exists?(:bulkrax_entries, :importer_id) add_column :bulkrax_entries, :importerexporter_type, :string, after: :id, default: 'Bulkrax::Importer' unless column_exists?(:bulkrax_entries, :importerexporter_type) end end
Version data entries
15 entries across 15 versions & 1 rubygems