Method: Sequent::Migrations::Executor#reset_table_names

Defined in:
lib/sequent/migrations/executor.rb

#reset_table_names(plan) ⇒ Object



64
65
66
67
68
69
70
# File 'lib/sequent/migrations/executor.rb', line 64

def reset_table_names(plan)
  plan.replay_tables.each do |migration|
    table = migration.record_class
    table.table_name = table.table_name.gsub("_#{migration.version}", '')
    table.reset_column_information
  end
end