PronounsPage/server/migrate.ts
Valentyne Stigloher 7ce1bb0e83 (ts) convert a lot to TypeScript
Co-authored-by: Sky <msurvival65@gmail.com>
Co-authored-by: tecc <tecc@tecc.me>
2024-02-23 17:48:16 +01:00

12 lines
289 B
TypeScript

import dbConnection from './db.ts';
const __dirname = new URL('.', import.meta.url).pathname;
async function migrate(): Promise<void> {
const db = await dbConnection();
await db.migrate({ migrationsPath: `${__dirname}/../migrations` });
await db.close();
}
await migrate();