Open prezensy opened 3 months ago
Same issue š„²
Using drizzle-kit@seq_fix
and drizzle-orm@0.33.0
, I still have the issue described by @prezensy.
In my example, I have two projects that use different table prefixes (target_
and other_
). My drizzle config:
import type { Config } from 'drizzle-kit';
import { env } from './src/env';
export default {
schema: './src/schema',
out: './migrations',
dialect: 'postgresql',
dbCredentials: {
url: env.POSTGRES_URL,
},
tablesFilter: ['target_*'],
verbose: true,
strict: true,
} satisfies Config;
The output of drizzle-kit push
:
[ā] Pulling schema from database...
Warning You are about to execute current statements:
ALTER TABLE "target_contact" ALTER COLUMN "location" SET DATA TYPE geometry(point);
DROP SEQUENCE "public"."other_client_id_seq";
DROP SEQUENCE "public"."other_client_coding_id_seq";
DROP SEQUENCE "public"."other_client_coding_client_id_seq";
DROP SEQUENCE "public"."other_hotel_id_seq";
DROP SEQUENCE "public"."other_profile_id_seq";
āÆ No, abort
Yes, I want to execute all statements
You can see in the output it's trying to drop all the sequences with the other_
prefix. I've been forced to downgrade to drizzle-kit@0.22.8
in the meantime.
Pinning drizzle-kit to 0.22.8
now prevents using the latest version of drizzle-orm
.
drizzle-kit: v0.22.8
drizzle-orm: v0.34.1
This version of drizzle-kit is outdated
Please update drizzle-kit package to the latest version š
Any update on this one?
What version of
drizzle-orm
are you using?0.32.1
What version of
drizzle-kit
are you using?0.23.0
Describe the Bug
I'm encountering issues with the
drizzle-kit push
command while trying to make schema changes in my Vercel Postgres database. The problem seems related to sequence dependencies that prevent the sequences from being dropped or modified. This issue started after upgrading todrizzle-kit v0.23.0
anddrizzle-orm v0.32.1
.I am using a single database to manage multiple projects, and they are differentiated by table filters. This setup complicates handling sequences and dependencies across different project schemas. Notably, when I downgrade to
drizzle-kit v0.22.8
, the issue is temporarily bypassed. Downgradingdrizzle-orm
does not produce errors, indicating that the issue may be specific to thedrizzle-kit
version.Error Logs:
drizzle.config.ts:
Expected behavior
The
push
command should handle sequence dependencies gracefully or provide an option to manage them without causing errors or requiring a downgradeEnvironment & setup