最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

elixir - Is there a way in Ecto to make an autoincrement field that is not a PK? - Stack Overflow

programmeradmin4浏览0评论

I'm trying to implement a grouping of rows by a logical ID (edit history). But I cannot find anywhere in the docs where autoincrement is listed as a parameter except for the primary key field generator.

My next best choice is splitting tables into two tables with a foreign key, but I'll need to repeat it over a few tables, and also this feels like this question will come up again in another scenario, so I thought I'd ask before I resort to plan B.

发布评论

评论列表(0)

  1. 暂无评论