class Litedb::Connection

def run_migrations

def run_migrations
  return if @config[:migrations].nil?
  migrations = if @config[:migrations].is_a?(Hash)
    @config[:migrations].values
  elsif @config[:migrations].is_a?(Array)
    @config[:migrations]
  else
    raise Error.new("`migrations` option must be either a Hash or an Array")
  end
  transaction(:immediate) do
    migrations.each do |sql|
      execute(clean_sql(sql))
    end
  end
end