dolthub / dolthub/dolt

Multiple `autoincrement` counters in a database

Open
#6,504 0 comments 0 reactions 0 assignees View on GitHub
customer issue enhancement sql version control
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

A customer heavily uses `autoincrement` keys because that's what the framework Laravel does by default. This is the same with SQLAlchemy. To facilitate `autoincrement` keys working with branches in normal use cases, currently, we share an `autoincrement` counter among branches of a table.

However, this runs afoul of the customer isolation use case, where you have a single database, shared schema and domain tables on `main` but have customer specific data on each branch. In this case, `autoincremnt` `id`s get commingled among customers. This may be ok for some but is especially hard for migration where there will be multiple `id`s shared among branches, confusing things.

There are a few things we can do:

1. Make shared `autoincrement` a database, table, and/or branch level configuration.
2. Make named/namespaced `autoincrement` counters that are shared

Other ideas welcome here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.