-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Report hasn't been filed before.
- 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.6-4414a19
What version of drizzle-kit are you using?
1.0.0-beta.6-4414a19
Other packages
No response
Describe the Bug
When running drizzle-kit push on my schema.ts file, it tries to delete schemas not-defined in my file.
% pnpm exec drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/wilson/Developer/Projects/example/stack/hc-auth-database/drizzle.config.ts'
Using 'pg' driver for database querying
[✓] Pulling schema from database...
┌─── public.hc_sessions.expires_at column changed:
│ notNull: false -> true
├───
│ ALTER TABLE "hc_sessions" ALTER COLUMN "expires_at" SET NOT NULL;
└───
┌─── public.hc_sessions.created_at column changed:
│ notNull: false -> true
├───
│ ALTER TABLE "hc_sessions" ALTER COLUMN "created_at" SET NOT NULL;
└───
Warning There're potential data loss statements:
· You're about to delete pscale_extensions schema with 2 tables
In my case, I'm running drizzle against a Planetscale Postgres instance.
Steps to reproduce:
- Create a dummy schema.ts with one table and one column
- Connect to a Planetscale Postgres instance
- Run drizzle-kit push
Workaround
Set schemaFilter: ['public'] on drizzle.config.ts. That said, I'm not sure if this should happen by default?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working