[postgres] ActiveRecordでtruncateしてIDも1から採番するようにする
976 ワード
参考
ActiveRecord::Base.connection.execute("TRUNCATE TABLE users")
ActiveRecord::Base.connection.execute("ALTER SEQUENCE users_id_seq RESTART WITH 1")
Author And Source
この問題について([postgres] ActiveRecordでtruncateしてIDも1から採番するようにする), 我々は、より多くの情報をここで見つけました https://qiita.com/t_fujise/items/91f3d54f779c7d6856ac著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .