Skip to content
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

[FEATURE]: drizzle seed should support custom datatypes #3917

Open
1 task done
stefanprobst opened this issue Jan 8, 2025 · 0 comments
Open
1 task done

[FEATURE]: drizzle seed should support custom datatypes #3917

stefanprobst opened this issue Jan 8, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@stefanprobst
Copy link

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

drizzle-seed should support seeding columns with custom dataypes - in my case, i have a bytea custom datatype (because postgres bytea is not yet natively supported by drizzle).

i had expected that i could just provide a custom refinement function for that column, like this:

await seed(db, schema).refine(() => {
  return {
    usersTable: {
      columns: {
        recoveryCode() {
          return Buffer.from(encryptString(generateRandomRecoveryCode()));
        },
      },
    },
  };
});

but that still throws with "Error: column with type bytea is not supported for now."

@stefanprobst stefanprobst added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant