Incorrect syntax for addDefaultValue Oracle 12c
Description
Environment
Oracle 12c
Activity
Show:
Don Smith September 12, 2014 at 7:50 PM
Should have used defaultValueComputed attribute, not defaultValue.
Invalid
Details
Details
Reporter
Don Smith
Don SmithComponents
Fix versions
Affects versions
Priority
Created September 12, 2014 at 6:42 PM
Updated September 12, 2014 at 7:50 PM
Resolved September 12, 2014 at 7:50 PM
changeSet:
<changeSet id="2400" author="IDMRBPM" dbms="oracle">
<addDefaultValue
tableName="CONFIGURATION_ITEM" columnName="ID"
defaultValue="CONFIGURATION_ITEM_ID_SEQ.NEXTVAL"/>
</changeSet>
Error message:
liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE IDMRBPM.CONFIGURATION_ITEM MODIFY ID DEFAULT 'CONFIGURATION_ITEM_ID_SEQ.NEXTVAL': ORA-01722: invalid number
If I remove the quotes around the sequence.nextval portion, it works:
ALTER TABLE IDMRBPM.CONFIGURATION_ITEM MODIFY ID DEFAULT CONFIGURATION_ITEM_ID_SEQ.NEXTVAL;