Module: Cardio::Migration::Port

Included in:
Cardio::Migration
Defined in:
lib/cardio/migration/port.rb

Overview

methods for porting migrations from old table to new table

Instance Method Summary collapse

Instance Method Details

#portObject



11
12
13
14
15
16
# File 'lib/cardio/migration/port.rb', line 11

def port
  return unless lease_connection.table_exists? old_deck_table
  rename_old_tables
  lease_connection.execute "INSERT INTO #{table} (#{select_nonduplicate_versions})"
  lease_connection.drop_table old_deck_table
end

#port_allObject



5
6
7
8
9
# File 'lib/cardio/migration/port.rb', line 5

def port_all
  %i[schema transform].each do |type|
    migration_class(type).port
  end
end