Open yknevenky opened 1 month ago
I'm having the same issue
❯ npx drizzle-kit introspect
drizzle-kit: v0.23.0
drizzle-orm: v0.32.0
No config path provided, using default path
Reading config file '/Users/redacted/Documents/workspace/redacted/drizzle.config.ts'
Pulling from ['public'] list of schemas
Using 'pg' driver for database querying
[✓] 8 tables fetched
[✓] 46 columns fetched
[✓] 0 enums fetched
[✓] 0 indexes fetched
[✓] 11 foreign keys fetched
TypeError: movedTables is not iterable
at applyPgSnapshotsDiff (/Users/redacted/Documents/workspace/redacted/node_modules/drizzle-kit/bin.cjs:29346:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async introspectPostgres (/Users/redacted/Documents/workspace/redacted/node_modules/drizzle-kit/bin.cjs:126156:42)
at async _Command.<anonymous> (/Users/redacted/Documents/workspace/redacted/node_modules/drizzle-kit/bin.cjs:131714:7)
I did notice that the drizzle/relations.ts
,drizzle/schema.ts
and meta/_journal.json
were created and appear to be correct however.
I also having the same issue
$ npx drizzle-kit introspect drizzle-kit: v0.23.0 drizzle-orm: v0.32.0
No config path provided, using default path Reading config file 'C:\Users\Admin\Desktop\Evitamin\am484\evitstool_full\drizzle.config.ts' Pulling from ['public'] list of schemas
Using 'pg' driver for database querying [✓] 339 tables fetched [✓] 13792 columns fetched [✓] 16 enums fetched [✓] 68 indexes fetched [✓] 1586579 foreign keys fetched
TypeError: movedTables is not iterable
at applyPgSnapshotsDiff (C:\Users\Admin\Desktop\Evitamin\am484\evitstool_full\node_modules.pnpm\drizzle-kit@0.23.0\node_modules\drizzle-kit\bin.cjs:29346:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async introspectPostgres (C:\Users\Admin\Desktop\Evitamin\am484\evitstool_full\node_modules.pnpm\drizzle-kit@0.23.0\node_modules\drizzle-kit\bin.cjs:126156:42)
at async _Command.
drizzle-kit: v0.23.0 drizzle-orm: v0.32.0
No config path provided, using default path Reading config file '/Users/cristonmascarenhas/Documents/projects/trail-backend/drizzle.config.ts' Pulling from ['public'] list of schemas
Using 'pg' driver for database querying [✓] 19 tables fetched [✓] 109 columns fetched [✓] 2 enums fetched [✓] 0 indexes fetched [✓] 14 foreign keys fetched
TypeError: movedTables is not iterable
at applyPgSnapshotsDiff (/Users/cristonmascarenhas/Documents/projects/trail-backend/node_modules/.pnpm/drizzle-kit@0.23.0/node_modules/drizzle-kit/bin.cjs:29346:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async introspectPostgres (/Users/cristonmascarenhas/Documents/projects/trail-backend/node_modules/.pnpm/drizzle-kit@0.23.0/node_modules/drizzle-kit/bin.cjs:126156:42)
at async _Command.
Same error with drizzle-kit introspect
with the latest version.
This is one of the first steps when we migrate from Prisma to Drizzle.
Same problem here
I run the same problem after upgrading the drizzle-orm version.
I fixed it by manually updating themigrations/meta/_journal.json
file from
{
"version": "5",
"dialect": "pg",
...
}
to
{
"version": "7",
"dialect": "postgresql",
...
}
Maybe the command drizzle-kit up
can help
Same error with
drizzle-kit introspect
with the latest version.This is one of the first steps when we migrate from Prisma to Drizzle.
Same here. I want to generate a schema.ts
file using introspect
.
Same issue on latest version of drizzle/drizzle-kit
Even I am facing the same error.
Having the same issue
Ditto here
Same here
Same
I directly edited bin.cjs
inside my node_modules to check if movedTables
is declared.
OBS: I don't know if this is right, but I was able to generate the schema based on the schemas that were already present in my Postgres.
This issue is reproducible for me in drizzle-kit
version 0.23.0
, 0.23.0-03c18d1
and 0.23.0-21045a0
but does not occur in version 0.22.8
or 0.22.9-92953ac
. So downgrading the version is a temporary workaround.
In all my tests drizzle-orm
is on version 0.32.0
(i guess drizzle-orm
is not used in this process?).
This issue is reproducible for me in
drizzle-kit
version0.23.0
,0.23.0-03c18d1
and0.23.0-21045a0
but does not occur in version0.22.8
or0.22.9-92953ac
. So downgrading the version is a temporary workaround. In all my testsdrizzle-orm
is on version0.32.0
(i guessdrizzle-orm
is not used in this process?).
this fixed it for me too
Having the same issue
drizzle-kit: v0.23.0 drizzle-orm: v0.32.1
No config path provided, using default path Reading config file '/Users/elihirwa/Desktop/Development/BAG/Projects/bag-app/drizzle.config.ts' Pulling from ['public'] list of schemas
Using 'pg' driver for database querying
[✓] 93 tables fetched
[✓] 641 columns fetched
[✓] 0 enums fetched
[✓] 1 indexes fetched
[✓] 151 foreign keys fetched
TypeError: movedTables is not iterable
at applyPgSnapshotsDiff (/Users/elihirwa/Desktop/Development/BAG/Projects/bag-app/node_modules/drizzle-kit/bin.cjs:29346:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async introspectPostgres (/Users/elihirwa/Desktop/Development/BAG/Projects/bag-app/node_modules/drizzle-kit/bin.cjs:126156:42)
at async _Command.<anonymous> (/Users/elihirwa/Desktop/Development/BAG/Projects/bag-app/node_modules/drizzle-kit/bin.cjs:131714:7)
✨ Done in 135.54s.
Same here
PLEASE FIX IT BUDDY T__T
Same
This issue is reproducible for me in
drizzle-kit
version0.23.0
,0.23.0-03c18d1
and0.23.0-21045a0
but does not occur in version0.22.8
or0.22.9-92953ac
. So downgrading the version is a temporary workaround. In all my testsdrizzle-orm
is on version0.32.0
(i guessdrizzle-orm
is not used in this process?).
Worked amazingly for me as well
do you see it on 0.24.0 version of drizzle-kit? Trying to reproduce it there, but no luck
What version of
drizzle-orm
are you using?"^0.32.0"
What version of
drizzle-kit
are you using?"^0.23.0"
Describe the Bug
I ran introspect command and following were the error
bunx drizzle-kit introspect drizzle-kit: v0.23.0 drizzle-orm: v0.32.0
No config path provided, using default path Reading config file '/Users/some_dirs/drizzle.config.ts' Pulling from ['product'] list of schemas
Using 'pg' driver for database querying [✓] 192 tables fetched [✓] 1074 columns fetched [✓] 0 enums fetched [✓] 0 indexes fetched [✓] 285 foreign keys fetched
TypeError: movedTables is not iterable at applyPgSnapshotsDiff (/Users/some_dirs/node_modules/drizzle-kit/bin.cjs:29346:22) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async introspectPostgres (/Users/some_dirs/node_modules/drizzle-kit/bin.cjs:126156:42) at async _Command. (/Users/some_dirs/node_modules/drizzle-kit/bin.cjs:131714:7)
And the following warnings/errors were shown in the vscode Cannot find name 'nextval'. Cannot find name 'regclass'.
export const resource = our_schema.table("resource", { resource_id: uuid("resource_id"), clicked_at: date("clicked_at").defaultNow(), clicker_ip: varchar("clicker_ip"), clicked_by: varchar("clicked_by"), id: integer("id").default(nextval('ourschema.social_clicks_id_seq'::regclass)).notNull(), });
Expected behavior
No response
Environment & setup
No response