且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过 rails 迁移在 Postgres 中设置主键 (ID) 列的起点

更新时间:2023-11-24 13:09:46

不知道红宝石和铁路部分,但你说的查询是

Have no idea about rubies and railroads part, but query you're talking about is

ALTER SEQUENCE reports_something_seq RESTART 1000;

您必须在您的表中查找序列名称和 postgresql 文档,以获取有关此事的一般教育;-)

You will have to look up your table for the sequence name and postgresql documentation for general education regarding the matter ;-)