mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-02 03:33:27 +00:00
feat: ( payment ) create payment microservice
This commit is contained in:
18
apps/edr-payment-api/src/scripts/migrate-revert.ts
Normal file
18
apps/edr-payment-api/src/scripts/migrate-revert.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user