-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Drizzle seed/bug fixes #4222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Drizzle seed/bug fixes #4222
+2,299
−1,146
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to drizzle-seed/bug-fixes
updated tests for using these generators(+date generator) with parameters, added feature to ignore column in refinements
…to drizzle-seed/bug-fixes
…to drizzle-seed/bug-fixes
|
@OleksiiKH0240 is this still being considered and would the allow ignore column refine work if the column is an id column and you want to do a with that has other tables that depend on it as right now drizzle seed is unusable if you want to use |
…to drizzle-seed/bug-fixes
This was referenced Dec 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug fixes
Both the
seedandresetfunctions didn't includeLibSQLDatabase<any>in their generic type parameters.As a result, the
seedfunction accepts adbparameter like this:But it will reject a
dbparameter defined like this:drizzle-seed misinterpreted
realEstateTypeEnumenum as arealtype.[BUG]: drizzle seed breaks serial sequence sync with Postgres serial type #3915
[BUG]: Seed UUIDs not compatible with Zod/v4 #4551 (used PR fix(drizzle-seed): change uuid generator #4503 by @MasterAM)
Features
Now you can let drizzle-seed know if you want to ignore column during seeding.
Improvements
timegeneratortimestampgeneratordatetimegeneratorexported
AbstractGeneratorso that users can build their own custom generator classes.drizzle-seed now updates PostgreSQL sequences after seeding.
drizzle-seed iterates through each column in a table, selects columns of type smallint, integer, bigint, smallserial, serial, or bigserial, and (if a sequence exists) updates it to the column’s maximum seeded value.
Breaking changes
uuidgenerator was changed and upgraded to v4Reason for upgrade
UUID values generated by the old version of the
uuidgenerator fail Zod’s v4 UUID validation.Example
Usage
Switch to the old version
The previous version of
uuidgenerator is v1.To use the v2 generators while maintaining the v1
uuidgenerator:To use the v3 generators while maintaining the v1
uuidgenerator: