migrate() function its no working on postgresjs.

What I'm trying to do is create a file migrate.ts with this code : import {migrate} from 'drizzle-orm/postgres-js/migrator'; import {db,client} from '.'; export const migration = async () => { console.log('starting migration'); await migrate(db,{migrationsFolder:"./supabase/migrations"}); await client.end(); console.log('migration ended'); } migration().catch(error => console.log(error)) the migration goes well but it does not apply the migration in the "./supabase/migrations"
2 Replies
Chris Jayden
Chris Jayden11mo ago
Do you have out: './supabase/migrations set in drizzle.config.ts?
SugerDADDY
SugerDADDY11mo ago
npm i -D dotenv and then put this line on top import 'dotenv/config';
Want results from more Discord servers?
Add your server