title: Merging values from DB using Liquibase and Spring
body: <p>I'm trying to use liquibase to change the layout of my DB, but and I have a question that is:</p>
  
  <p>Lets say for example that my old DB has a table which had 2 columns (firstName, lastName) but my new DB has only one column for those two (userName).</p>
  
  <p>How could I do this migration using liquibase and Spring. Because with the following logic I would lose the original values.</p>
  
  <p>Ideally I would like to be able to call my java code to make the changes, event though in this case it's over engineering in other cases it may be required ;) </p>
  
  <pre><code>&lt;databaseChangeLog
      xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.1
      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.1.xsd"&gt;
  
      &lt;changeSet author="gcardoso" id="2012082703"&gt;
  
          &lt;dropColumn columnName="firstName" tableName="t_user"/&gt;
          &lt;dropColumn columnName="lastName" tableName="t_user"/&gt;
  
          ?????? How to migrate the names ??????
  
          &lt;addColumn tableName="t_user"&gt;
              &lt;column name="userName" type="VARCHAR2(255,0)"&gt;
                  &lt;constraints nullable="false"/&gt;
              &lt;/column&gt;
          &lt;/addColumn&gt;
      &lt;/changeSet&gt;
  &lt;/databaseChangeLog&gt;
  </code></pre>