drizzle-team / drizzle-team/drizzle-orm
[BUG]: drizzle-seed sequence updates don't have proper column casing
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [x] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
1.0.0-beta.16
### What version of `drizzle-kit` are you using?
1.0.0-beta.16
### Other packages
drizzle-seed@1.0.0-beta.16
### Describe the Bug
### What is the undesired behavior?
When running drizzle seed on a database with snake_case casing, it will throw an error on any int-like columns that have more than one word.
```
DrizzleQueryError: Failed query: SELECT setval(pg_get_serial_sequence('"users"', 'multiWordInt'), 999, true);
```
I believe the bug was introduced with https://github.com/drizzle-team/drizzle-orm/pull/4222/changes/b5a9650384f7de0c8e2d7494f57f6287b4ec4ebb
### What are the steps to reproduce it?
1. Create a table with an integer column that has more than one word
2. Initiate database with 'camel_case' casing
3. Run seed(db, { table })
```ts
const users = pgTable(
'users',
{
id: integer().primaryKey(), // no error since one word
multiWordInt: integer(), // ! errors on seeding since the casing won't match
firstName: string(), // no error since it's not int-like
}
);
const database = drizzle({ schema, casing: 'snake_case' });
await seed(database, { users });
```
### Environment Details
**drizzle-seed version**: 1.0.0-beta.16
**Node Version**: 24
**DB Engine**: Postgres
Contributor guide
Assessment
This issue has not been assessed yet.