Unable to run migrations

I have this small script I'm running to perform the db migrations:


import { migrate } from "drizzle-orm/vercel-postgres/migrator";
import { db } from ".";

const runMigrations = async () => {
  console.log("migration started...");
  const res = await migrate(db, { migrationsFolder: "drizzle" });
  console.log("migration performed succesfully!", res);
  process.exit(0);
};

runMigrations().catch((err) => {
  console.log("Error trying to apply migrations: ", err);
  process.exit(0);
});


I've made sure the migrationsFolder is the one I want, it has a sql migration file that looks like this (it has more fields ofc):

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
END $$;
--> statement-breakpoint
DO $$ BEGIN
 CREATE TYPE "action_status" AS ENUM('PENDING', 'COMPLETED');
EXCEPTION
 WHEN duplicate_object THEN null;
END $$;


I get no erros but my db remains the same, you got any ideas ?
Was this page helpful?