使用postgresql数据库在liquibase中设置初始值

问题描述 投票:1回答:1

我有一个表,我需要它的ID开始在1000000.我有liquibase的代码集:

        <column name="id" type="bigint" autoIncrement="true" startWith="1000000">
            <constraints primaryKey="true" nullable="false"/>
        </column>

但它在postgres中不起作用,生成的序列生成器从1开始。有没有人对此有任何想法?如何启用表从liquibase中与postgresql一起使用的值开始?提前致谢!

sql postgresql hibernate liquibase
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.