Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column oracle clob issue #11

Closed
Spotmydot opened this issue Jun 6, 2014 · 3 comments
Closed

Column oracle clob issue #11

Spotmydot opened this issue Jun 6, 2014 · 3 comments

Comments

@Spotmydot
Copy link

Hello,

With the update table tag, when specify column of type="CLOB" this isn't handled correctly by liquibase and throws error. ORA-01704: string literal too long.
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)

e.g:

<changeSet id="id_example" author="spotymydot" runOnChange="true">
    <update tableName="RULES">
        <column name="script" type="CLOB"><![CDATA[

lots of data goes here
]]>

This requires the oracle function to_clob() to be used.

http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions182.htm

This is with the latest 3.2.0 version of liquibase

@Spotmydot
Copy link
Author

Looks like this has fixed this in a fork by @leonardseymore
please pull this into master
liquibase/liquibase#257

@dcebotarenco
Copy link

Please push the fix to master. I have 3.2.2 and the fix is not applied.
current code:
UpdateDataChange.class
for (ColumnConfig column : getColumns()) {
if (column.getValueBlobFile() != null) {
needsPreparedStatement = true;
}
if (column.getValueClobFile() != null) {
needsPreparedStatement = true;
}
}

same in InsertDataChange.class
for (ColumnConfig column : columns) {
if (column.getValueBlobFile() != null) {
needsPreparedStatement = true;
}
if (column.getValueClobFile() != null) {
needsPreparedStatement = true;
}
// if (column.getValueText() != null && database instanceof InformixDatabase) {
// needsPreparedStatement = true;
// }
}

@nvoxland
Copy link
Contributor

nvoxland commented Oct 9, 2014

Merged in pull request liquibase/liquibase#257 for liquibase 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants