You may be able to try defaultValueComputed="‘NOW’" (note that there are single quotes around the NOW inside the double quotes)
Nathan
You may be able to try defaultValueComputed="‘NOW’" (note that there are single quotes around the NOW inside the double quotes)
Nathan
Hello Nathan,
Thank you for the reply. I should have been more specific, sorry. This column has nothing to do with dates. It is a text field with arbitrary text data in it. So what is happening is it reads in the text ‘NOW’ and translates that to a date, which then causes it to choke due to the size of the data vs the size it is expecting to put in the column:
liquibase.exception.DatabaseException: java.sql.SQLDataException: data exception: string data, right truncation
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1227)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1210)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:550)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)
at liquibase.Liquibase.update(Liquibase.java:200)
at liquibase.Liquibase.update(Liquibase.java:181)
at liquibase.Liquibase.update(Liquibase.java:174)
I am trying to load data in to my database with the loadData changeset. One of the rows in my data has the word ‘NOW’ for one of the values in a column. Liquibase is then converting that to the ‘NOW’ current time keyword instead of the string “NOW”.
Is there a way to escape this value? I tried quotes around it and that did not help.