| 1 | import { drizzle } from 'drizzle-orm/node-postgres' |
| 2 | import { migrate } |
| 3 | |
| 4 | const url = process |
| 5 | if (!url) { |
| 6 | console.error('DATABASE_URL is required |
| 7 | process.exit(1) |
| 8 | } |
| 9 | |
| 10 | async function main() |
| 11 | const db = |
| 12 | console.log('Running migrations... |
| 13 | await migrate(db |
| 14 | console.log('Migrations complete. |
| 15 | process.exit(0) |
| 16 | } |
| 17 | |
| 18 | main().catch((err |
| 19 | console.error(err |
| 20 | process.exit(1) |
| 21 | }) |