Migration not pushing new columns to database.

When I generate a migration and run the migration script, new columns don't get pushed to the db but when I change a column type for example, and run the script, the changes get applied.

This is my migration script:
const postgres = require('postgres')
const { drizzle } = require('drizzle-orm/postgres-js')
const { migrate } = require('drizzle-orm/postgres-js/migrator')
require('dotenv').config()

const client = postgres(process.env.DATABASE_URL, { max: 1 })

const mg = async () => {
  await migrate(drizzle(client, { logger: true }), {
    migrationsFolder: 'drizzle'
  })
  await client.end()
}

mg()


Please help.
Was this page helpful?