Skip to content
New issue

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

npx drizzle-kit push command in 'Get Started with Drizzle and PostgreSQL' errors #474

Open
josephmarkus opened this issue Jan 5, 2025 · 0 comments

Comments

@josephmarkus
Copy link

Docs page: https://orm.drizzle.team/docs/get-started/postgresql-new
On GitHub:

# Get Started with Drizzle and PostgreSQL

Two things:

  1. Under "Step 6 - Applying changes to the database", running "npx drizzle-kit push" results in:
Reading config file '[...]/drizzle.config.ts'
Using 'pg' driver for database querying
[⣷] Pulling schema from database...
AggregateError [ECONNREFUSED]: 
    at [...]/node_modules/pg-pool/index.js:45:11
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.query ([...]/node_modules/drizzle-kit/bin.cjs:78762:26)
    at async fromDatabase2 ([...]/node_modules/drizzle-kit/bin.cjs:37273:25) {
  code: 'ECONNREFUSED',
  ...

Running with npx drizzle-kit push:pg is ok, but produces a warning:

This command is deprecated, please use updated 'push' command (see https://orm.drizzle.team/kit-docs/upgrade-21#how-to-migrate-to-0210)

  1. Under "Step 3 - Connect Drizzle ORM to the database" this entire line of imports is unused:
import { pgTable, serial, text, varchar } from "drizzle-orm/pg-core";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant