diff --git a/lib/Doctrine/DBAL/Migrations/Version.php b/lib/Doctrine/DBAL/Migrations/Version.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Migrations/Version.php
+++ b/lib/Doctrine/DBAL/Migrations/Version.php
@@ -239,15 +239,16 @@ class Version
                         $this->_outputWriter->write('     <comment>-></comment> ' . $query);
                         $this->_connection->executeQuery($query);
                     }
-
-                    if ($direction === 'up') {
-                        $this->markMigrated();
-                    } else {
-                        $this->markNotMigrated();
-                    }
                 } else {
                     $this->_outputWriter->write(sprintf('<error>Migration %s was executed but did not result in any SQL statements.</error>', $this->_version));
                 }
+
+                if ($direction === 'up') {
+                    $this->markMigrated();
+                } else {
+                    $this->markNotMigrated();
+                }
+
             } else {
                 foreach ($this->_sql as $query) {
                     $this->_outputWriter->write('     <comment>-></comment> ' . $query);
Always add/remove the entry from the doctrine_migration_versions
table regardless of its content.

This fixes a bug where entries were not removed if either the
up or down methods didn't contain an action. In some instance
this meant you could migrate down, but no longer migrate up
at a later date.