Further improvements for backup import/export
This commit is contained in:
parent
b9cd858ec7
commit
d5f44c1b8f
24 changed files with 539 additions and 201 deletions
|
@ -20,7 +20,8 @@ describe('SQL/updateToSchemaVersion1100', () => {
|
|||
beforeEach(() => {
|
||||
db = createDB();
|
||||
// index updated in 1170
|
||||
updateToVersion(db, 1170);
|
||||
// columns updated in 1210
|
||||
updateToVersion(db, 1210);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
@ -153,7 +153,13 @@ describe('SQL/updateToSchemaVersion89', () => {
|
|||
.prepare(selectHistoryQuery)
|
||||
.all()
|
||||
.map(row => {
|
||||
return callHistoryDetailsSchema.parse(row);
|
||||
return callHistoryDetailsSchema.parse({
|
||||
...row,
|
||||
|
||||
// Not present at the time of migration, but required by zod
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -451,6 +457,10 @@ describe('SQL/updateToSchemaVersion89', () => {
|
|||
direction: CallDirection.Incoming,
|
||||
status: DirectCallStatus.Accepted,
|
||||
timestamp: Date.now(),
|
||||
|
||||
// Not present at the time of migration
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
insertCallHistory({
|
||||
callId: 'abc',
|
||||
|
@ -461,6 +471,10 @@ describe('SQL/updateToSchemaVersion89', () => {
|
|||
direction: CallDirection.Incoming,
|
||||
status: GroupCallStatus.Accepted,
|
||||
timestamp: Date.now(),
|
||||
|
||||
// Not present at the time of migration
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
|
||||
updateToVersion(db, 89);
|
||||
|
@ -487,6 +501,10 @@ describe('SQL/updateToSchemaVersion89', () => {
|
|||
direction: CallDirection.Incoming,
|
||||
status: DirectCallStatus.Pending,
|
||||
timestamp: Date.now() - 1000,
|
||||
|
||||
// Not present at the time of migration
|
||||
startedById: null,
|
||||
endedTimestamp: null,
|
||||
});
|
||||
|
||||
createCallHistoryMessage({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue