Reputation: 47
I have a sequence in my oracle database and the cache size is seted to 20. I want to alter this attribute to "NOCACHE". But I have to do this through liquibase. How can I do this? I did this chageset:
<changeSet author="MY Name" id="2.1">
<preConditions onFail="MARK_RAN" onFailMessage="The sequence SEQUENCEONE does not exists in the database.">
<sequenceExists sequenceName="SEQUENCEONE "/>
</preConditions>
<alterSequence
NOCACHE
sequenceName="SEQUENCEONE "
/>
<comment>Alter in sequence</comment>
</changeSet>
I throw me this error:
Attribute name "NOCACHE" associated with an element type "alterSequence" must be followed by the ' = ' character. -> [Help 1]
Upvotes: 2
Views: 2557
Reputation: 15773
@SteveDonie's answer works well, but alternately you can use modifySql with the createSequence tag to add the NOCACHE to what would be normally be generated.
Upvotes: 4
Reputation: 9016
Liquibase doesn't have an attribute to change the caching behavior of sequences. It appears that unless a change is made to Liquibase, you would have to make this change in a custom SQL tag.
Upvotes: 2