CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
migrate.ts
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| fc1817a | 1 | import { neon } from "@neondatabase/serverless"; |
| 2 | import { drizzle } from "drizzle-orm/neon-http"; | |
| 3 | import { migrate } from "drizzle-orm/neon-http/migrator"; | |
| 4 | import { config } from "../lib/config"; | |
| 5 | ||
| 6 | async function runMigrations() { | |
| 7 | const sql = neon(config.databaseUrl); | |
| 8 | const db = drizzle(sql); | |
| 9 | console.log("Running migrations..."); | |
| 10 | await migrate(db, { migrationsFolder: "./drizzle" }); | |
| 11 | console.log("Migrations complete."); | |
| 12 | } | |
| 13 | ||
| 14 | runMigrations().catch((err) => { | |
| 15 | console.error("Migration failed:", err); | |
| 16 | process.exit(1); | |
| 17 | }); |