简体   繁体   English

如何重置arangodb中的auto_crement_key值?

[英]How to reset autoincrement _key value in arangodb?

I want to reset autoincrement _key value in arangodb. 我想在arangodb中重置autoincrement _key值。 How? 怎么样?

I do not know of a way to reset the auto increment in place. 我不知道将自动增量重置到位的方法。 But how about: 但是如何:

  • creating a new collection 创建一个新的收藏
  • inserting all the data from the existing table , if any (without specifying the _key in the insert so the data gets a new _key). 插入现有表中的所有数据(如果有的话)(在插入中未指定_key,以便数据获得新的_key)。
  • Deleting the old collection (after verifying the data was properly inserting in the new table). 删除旧集合(在验证数据已正确插入新表之后)。
  • And finally, renaming the new table to the old table's name. 最后,将新表重命名为旧表的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM