title: Alter column length with liquibase
body: <p>I am having problems changing a column length in my postgres db with liquibase.</p>
  
  <p>I have a table account with a field description varchar(300).  I want to change it to varchar(2000).</p>
  
  <p>I have dropped and recreated the primary key in the same file so I don't have permissions issues or schema / db names or anything like this.  For the sake of testing I have cleared the table of data.</p>
  
  <p>I am running </p>
  
  <pre><code>&lt;changeSet author="liquibase" id="sample"&gt;
      &lt;modifyDataType
          columnName="description"
          newDataType="varchar(2000)"
          schemaName="accountschema"
          tableName="account"/&gt;
  &lt;/changeSet&gt;
  </code></pre>
  
  <p>I'm getting this error text but I can't understand the issue.  The only constraint the column had was a not null constraint and I successfully added a separate changelog to remove this constraint (ignoring the fact I don't see why this would affect extending the length of the field).</p>
  
  <p>Can anyone point to what I am doing wrong?</p>
  
  <ul>
  <li>FAILURE: Build failed with an exception.</li>
  <li><p>What went wrong:</p>
  
  <p>Execution failed for task ':db-management:update'.</p>
  
  <blockquote>
    <p>liquibase.exception.LiquibaseException: Unexpected error running Liquibase: Error parsing line 37 column 38 of src/main/changelog/db.changelog-accountdb-1.1.xml: cvc-complex-type.2.4.a: Invalid content was found starting with element
    'modifyDataType'. One of '{"<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":validCheckSum, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":preConditions, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":tagDatabase, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":comment, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":createTable, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropTable, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":createView, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":renameView, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropView, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":insert, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addColumn, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":sql, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":createProcedure, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":sqlFile, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":renameTable, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":renameColumn, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropColumn, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":modifyColumn, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":mergeColumns, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":createSequence, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":alterSequence, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropSequence, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":createIndex, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropIndex, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addNotNullConstraint, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropNotNullConstraint, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addForeignKeyConstraint, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropForeignKeyConstraint, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropAllForeignKeyConstraints, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addPrimaryKey, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropPrimaryKey, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addLookupTable, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addAutoIncrement, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addDefaultValue, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropDefaultValue, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":addUniqueConstraint, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":dropUniqueConstraint, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":customChange, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":update, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":delete, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":loadData, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":executeCommand, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":stop, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":rollback, "<a href="http://www.liquibase.org/xml/ns/dbchangelog/1.9" rel="noreferrer">http://www.liquibase.org/xml/ns/dbchangelog/1.9</a>":modifySql}' is expected.</p>
  </blockquote></li>
  </ul>