fix: separate private company documents from shared tender item imports

This commit is contained in:
2026-09-06 09:30:37 +03:00
parent 5e9f17969c
commit ece623d86c
8 changed files with 52 additions and 14 deletions
+2 -1
View File
@@ -15,11 +15,12 @@ after(() => rmSync(dir, { recursive: true, force: true }));
test('old volume migrates before indexing, preserves files and migration is repeatable', () => {
for (let i = 0; i < 2; i++) {
const db = store.openDb();
assert.equal(db.prepare('SELECT COUNT(*) n FROM schema_migrations').get().n, 1);
assert.equal(db.prepare('SELECT COUNT(*) n FROM schema_migrations').get().n, 2);
assert.ok(db.prepare('PRAGMA table_info(belgeler)').all().some(c => c.name === 'ikn'));
db.close();
}
assert.equal(store.listDocuments('a@example.test')[0].ad, 'Eski belge');
assert.equal(store.listDocuments('a@example.test')[0].tur, 'firma');
assert.deepEqual(store.listDocuments('b@example.test'), []);
});
test('five preparation records persist across DB close/reopen and stay account scoped', () => {