Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : Loading data with dates in Oracle throws DatabaseException

$
0
0
Ok, found out how to do this:
  1. <changeSet id="20140903-initial-data-usr_specs" author="Bart">
  2.     <loadData
  3.         encoding="UTF-8"
  4.         file="liquibase/initdata/changelog_SNAPSHOT_1/usr_specs.csv"
  5.         tableName="usr_specs">
  6.         <column name="d_beg" type="DATE"/>
  7.         <column name="d_end" type="DATE"/>
  8.         <column name="dt_rec" type="DATETIME"/>
  9.         <column name="dt_sup" type="DATETIME"/>
  10.     </loadData>
  11. </changeSet>
By specifying the date fields, Liquibase parses the date values with the pattern as specified in the documentation: ‘YYYY-MM-DD' or 'hh:mm:ss’ or ‘YYYY-MM-DDThh:mm:ss’.

Now when I think about this matter, it is quite logical that you have to specify to Liquibase what kind of field it has to deal with. But when quick referencing the documentation it was not so quite clear to me. Please, could you add to the documentation an example of loadData with date fields like above?

Bart Weber
Software Engineer

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>