lib/pg_migrate/migrator.rb in pg_migrate-0.0.1 vs lib/pg_migrate/migrator.rb in pg_migrate-0.1.0

- old
+ new

@@ -70,11 +70,11 @@ def execute_migration(name, filepath) @log.debug "executing migration #{filepath}" statements = @sql_reader.load_migration(filepath) if statements.length == 0 - raise 'no statements found in migration #{migration_path}' + raise 'no statements found in migration #{filepath}' end run_migration(name, statements) end # execute all the statements of a single migration @@ -84,10 +84,10 @@ statements.each do |statement| conn.exec(statement).clear end rescue Exception => e # we make a special allowance for one exception; it just means this migration - # has already occured, and we should just treat it like a continue + # has already occurred, and we should just treat it like a continue if e.message.index('pg_migrate: code=migration_exists').nil? conn.exec("ROLLBACK") raise e else conn.exec("ROLLBACK")