drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Allow for non sequential primary key for id of migrationsTable
Open
db/cockroachdb
drizzle/kit
enhancement
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
For at least the pg-core dialect, it would be great if we had the option to set the id column type to something non sequential like a `UUID`. I have been trying Drizzle with CockroachDB and everything seems to be working okay but it does complain about the `SERIAL` id type on the migrationsTable. Sequential primary keys in distributed databases can cause hot spotting. CockroachDB recommends using a `UUID` with a default value of `gen_random_uuid()`. I don't think this will cause a problem in the long run but it would remove the warning when running a migration.
Contributor guide
Assessment
This issue has not been assessed yet.