使用 oracle 更改 Liquibase 中的序列

Changing the sequence in Liquibase with oracle

我有一个 table X 几年前在 Liquibase 中创建的,没有序列。最近,通过执行以下步骤尝试进行更正:


现在这些更改已推送到产品中。他们要求我将 sequence 从 2000 年更改为 2050 年。

我之前从未使用过 Liquibase;我的想法是删除该序列并使用 startValue=2050.

创建一个新序列

但我不确定是否有更好的方法。

感谢您的帮助!

这种方式对我有用:

<changeSet  author="ml"  id="20200730-sequence">  
    <dropSequence  sequenceName="seq_id"/>  
    <createSequence    
            sequenceName="seq_id"
            startValue="2050"
            incrementBy="1"  
            ordered="true"/> 
</changeSet>