mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
19 lines
463 B
TypeScript
19 lines
463 B
TypeScript
import "dotenv/config";
|
|
import { AppDataSource } from "../data-source";
|
|
|
|
/** `pnpm --filter @edr/payment-api migration:revert` — undo the most recent migration. */
|
|
async function main(): Promise<void> {
|
|
await AppDataSource.initialize();
|
|
try {
|
|
await AppDataSource.undoLastMigration();
|
|
console.log("reverted last migration");
|
|
} finally {
|
|
await AppDataSource.destroy();
|
|
}
|
|
}
|
|
|
|
main().catch((err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|