Git Product home page Git Product logo

Comments (16)

pschaub avatar pschaub commented on August 18, 2024 4

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?).

from drizzle-orm.

bbcriston avatar bbcriston commented on August 18, 2024 1

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/[email protected]/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/[email protected]/node_modules/drizzle-kit/bin.cjs:126156:42)
at async _Command. (/Users/cristonmascarenhas/Documents/projects/trail-backend/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:131714:7)

from drizzle-orm.

RobSchilderr avatar RobSchilderr commented on August 18, 2024 1

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 fixed it for me too

from drizzle-orm.

CommandLineDesign avatar CommandLineDesign commented on August 18, 2024

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.

from drizzle-orm.

Sourabh-jana avatar Sourabh-jana commented on August 18, 2024

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\[email protected]\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\[email protected]\node_modules\drizzle-kit\bin.cjs:126156:42)
at async _Command. (C:\Users\Admin\Desktop\Evitamin\am484\evitstool_full\node_modules.pnpm\[email protected]\node_modules\drizzle-kit\bin.cjs:131714:7)

from drizzle-orm.

kenn avatar kenn commented on August 18, 2024

Same error with drizzle-kit introspect with the latest version.

This is one of the first steps when we migrate from Prisma to Drizzle.

from drizzle-orm.

SgtErnestBilko avatar SgtErnestBilko commented on August 18, 2024

Same problem here

from drizzle-orm.

antoinebassin avatar antoinebassin commented on August 18, 2024

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

from drizzle-orm.

emielvangoor avatar emielvangoor commented on August 18, 2024

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.

from drizzle-orm.

qscacheri avatar qscacheri commented on August 18, 2024

Same issue on latest version of drizzle/drizzle-kit

from drizzle-orm.

praaatik avatar praaatik commented on August 18, 2024

Even I am facing the same error.

from drizzle-orm.

serhii-kucherenko avatar serhii-kucherenko commented on August 18, 2024

Having the same issue

from drizzle-orm.

jontybrook avatar jontybrook commented on August 18, 2024

Ditto here

from drizzle-orm.

samueldurantes avatar samueldurantes commented on August 18, 2024

Same here

from drizzle-orm.

EvanGreener avatar EvanGreener commented on August 18, 2024

Same

from drizzle-orm.

samueldurantes avatar samueldurantes commented on August 18, 2024

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.

Code:
image

from drizzle-orm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.