We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
drizzle-orm
0.30.10
drizzle-kit
0.20.18
Hello. I have a simple table with a status column
export const BaseSchema = pgSchema(settings.DB_SCHEMA_NAME); // DB_SCHEMA_NAME=my_schema export const statusEnum = BaseSchema.enum("version_status", ['draft', 'published', 'inactive']); export const versions = BaseSchema.table("versions", { status: statusEnum("status").default("draft"), // ...rest columns });
// migration config migrate(drizzle(migrationClient), {migrationsFolder: "src/migrations", migrationsSchema: "my_schema"}) // drizzle kit config const config = { schema: "src/models", out: "src/migrations", driver: "pg", schemaFilter: "my_schema", dbCredentials: { connectionString: settings.DB_URL, }, verbose: true, strict: true, }; export default defineConfig(config);
New generated migration contains this:
DO $$ BEGIN CREATE TYPE "version_status" AS ENUM('draft', 'published', 'inactive'); EXCEPTION WHEN duplicate_object THEN null; END $$;
But it does not consider DB_SCHEMA_NAME, and this type will be stored in public.object types instead of my_schema.object types
I expect the migration to contain this:
DO $$ BEGIN CREATE TYPE "my_schema"."version_status" AS ENUM('draft', 'published', 'inactive'); EXCEPTION WHEN duplicate_object THEN null; END $$;
(TYPE "my_schema"."version_status") instead of (TYPE "version_status")
I use postgres.js, drizzle 0.30.10 and drizzle-kit 0.20.18
The text was updated successfully, but these errors were encountered:
Please try upgrading to latest drizzle-kit, it should handle enums as expected
https://orm.drizzle.team/kit-docs/upgrade-21
Sorry, something went wrong.
No branches or pull requests
What version of
drizzle-orm
are you using?0.30.10
What version of
drizzle-kit
are you using?0.20.18
Describe the Bug
Hello. I have a simple table with a status column
New generated migration contains this:
But it does not consider DB_SCHEMA_NAME, and this type will be stored in public.object types instead of my_schema.object types
Expected behavior
I expect the migration to contain this:
(TYPE "my_schema"."version_status") instead of (TYPE "version_status")
Environment & setup
I use postgres.js, drizzle 0.30.10 and drizzle-kit 0.20.18
The text was updated successfully, but these errors were encountered: