21258edd95
Hop-State: A_06FP5KEDBTB4A9ZT7QB498G Hop-Proposal: R_06FP5KDWMCKVVMQZT4MVZ28 Hop-Task: T_06FP5DZ7T0G45FG93PT90B8 Hop-Attempt: AT_06FP5DZ7T0PKQW99V27JCV8
18 lines
419 B
TypeScript
18 lines
419 B
TypeScript
import { migrate } from 'drizzle-orm/tursodatabase/migrator';
|
|
import { db } from '../src/db';
|
|
|
|
async function main() {
|
|
const result = await migrate(db, { migrationsFolder: './drizzle' });
|
|
|
|
if (result) {
|
|
throw new Error(`Database migration failed: ${JSON.stringify(result)}`);
|
|
}
|
|
|
|
console.log('Database migrations are up to date.');
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
});
|