© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago
JakeCarbine

Migration issues

Hello, I'm using drizzel ORM for my expressjs app and I'm using postgresql with docker. when I try to run migrations. recieve this error: password authentication failed for user "postgres"

This is my dockerfile:
version: "3"
services:
db:
image: postgres
restart: always
volumes:
- ./data/db:/var/lib/postgresql/data
ports:
- 5432:5432

environment:
- POSTGRES_DB=testDB
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres

adminer:
image: adminer
restart: always
ports:
- 8080:8080
this is my migrate.ts:
import { Client, Pool } from "pg";
import { drizzle } from "drizzle-orm/node-postgres";
import { migrate } from "drizzle-orm/node-postgres/migrator";
import "dotenv/config";

const pool = new Pool({
connectionString:process.env.CONNECTION_STRING,
});


const db = drizzle(pool);

async function main() {
try {
console.log("migration started...");
console.log(process.env.CONNECTION_STRING)
await migrate(db, { migrationsFolder: "./drizzle" });
console.log("migration ended...");
process.exit(0);
} catch (error) {
console.error(
migration error:${error}
migration error:${error}
)
}

}

main().catch((err) => {
console.log(err);
process.exit(0);
});

CONNECTION_STRING="postgresql://postgres:postgres@localhost:5432/testDB?schema=public"
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Migration and existing policy issues
Drizzle TeamDTDrizzle Team / help
2y ago
Lock issues / deadlock during postgres migration
Drizzle TeamDTDrizzle Team / help
3y ago
`ADD COLUMN` and `RENAME COLUMN` migration issues
Drizzle TeamDTDrizzle Team / help
2y ago
Custom migration
Drizzle TeamDTDrizzle Team / help
15mo ago