title: How to update already run database migration files using Grails DBMigration plugin?
body: <p>I have migration file named <code>test-plugin-migration-1.2.groovy</code> which nedds to be only renamed as migrations listed in it are already run and some other custom migrations.</p>
  
  <p><code>test-plugin-migration-1.2.groovy</code> - > <code>test-plugin-migration-1-2.groovy</code></p>
  
  <p>I tried adding a custom migration for <code>DATABASECHANGELOG</code> table in new file named <code>rename-migration.groovy</code></p>
  
  <p><strong>rename-migration.groovy</strong></p>
  
  <pre><code>changeSet(author: "Laxmi Salunkhe", id: "12345-1") {
      grailsChange {
          change {
              sql.execute("""update DATABASECHANGELOG set 
                  filename='test-plugin-migration-1-2.groovy' where
                  filename='test-plugin-migration-1.2.groovy'""")
          }
      }
  }
  </code></pre>
  
  <p><strong>changelog.groovy</strong></p>
  
  <pre><code>databaseChangeLog = {
  
      // Some Old Migrations
  
      include file: 'rename-migration.groovy'
  
      // Previously it was test-plugin-migration-1.2.groovy
      include file: 'test-plugin-migration-1-2.groovy' 
  
      include file: 'new-plugin-migration.groovy'
  }
  </code></pre>
  
  <p>It still runs renamed file migrations again.</p>
  
  <p>After going through <code>liquibase</code> documentation for <a href="http://www.liquibase.org/documentation/changeset.html" rel="nofollow">update</a>, It explains</p>
  
  <p><code>Liquibase executes the databaseChangeLog, it reads the changeSets in order and, for each one, checks the “databasechangelog” table to see if the combination of id/author/filepath has been run.</code></p>
  
  <p>What should I do to avoid renamed files change set getting applied on database?</p>