fix(new): ledger every schema migration

Amp-Thread-ID: https://ampcode.com/threads/T-019e55df-9bcd-73e6-9935-c1e6238cd273
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
ZacharyZhang-NYandAmp committed 2026-05-23 14:37:25 -04:00
1 parent 0b53eec292
commit df9317ef4b
2 files changed
+50 -11

No files matched your search

@@ -19,6 +19,14 @@ function createConnection(): DatabaseConnection {
}
describe("domain services", () => {
test("records every applied schema migration version", () => {
const connection = createConnection();
const rows = connection.db.prepare("select version from schema_migrations order by version asc").all() as Array<{ version: number }>;
expect(rows.map((row) => row.version)).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9]);
connection.close();
});
test("creates an organization with providers, chat spaces, employee, and audit", () => {
const connection = createConnection();
const organization = new OrganizationService(connection.db);