Module: Makanai::Migration

Defined in:
lib/makanai/migration.rb

Instance Method Summary collapse

Instance Method Details

#execute_sql(sql_path:, db: Makanai::Database.new) ⇒ Object



8
9
10
11
12
# File 'lib/makanai/migration.rb', line 8

def execute_sql(sql_path:, db: Makanai::Database.new)
  sql = File.read(sql_path)
  puts "execute: #{sql_path}"
  db.execute_sql(sql)
end

#migration_root_pathObject



14
15
16
# File 'lib/makanai/migration.rb', line 14

def migration_root_path
  Settings.migration_full_path
end