We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f83840e commit 95da305Copy full SHA for 95da305
src/rollbackByKey/test.ts
@@ -72,6 +72,15 @@ const testRollbackByKey: TestFactory = (createService) => {
72
service.rollbackByKey({ key: testMigrationKey }),
73
]);
74
});
75
+
76
+ it('should only rollback a migration once when its migrated more than once', async () => {
77
+ const service = createService([createTestDownMigration()]);
78
+ await service.migrate();
79
+ await service.migrateByKey({ key: testMigrationKey, force: true });
80
+ await service.rollback();
81
+ const promise = service.rollbackByKey({ key: testMigrationKey });
82
+ await assertRejects(promise, UnprocessedMigrationError);
83
+ });
84
85
};
86
0 commit comments