Fix database offline record format bug & basic sync logic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9258bf4d71
commit
708c029079
@ -66,7 +66,7 @@ export class DatabaseComponent extends EditorNodeContract implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.editorService.registerNodeEditor(this.nodeId, this).then(() => {
|
this.editorService.registerNodeEditor(this.nodeId, this).then(() => {
|
||||||
|
console.log('database editor', this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,9 +853,9 @@ export class ApiService {
|
|||||||
|
|
||||||
for ( const row of rowData ) {
|
for ( const row of rowData ) {
|
||||||
const newDatabaseEntry = new DatabaseEntry(
|
const newDatabaseEntry = new DatabaseEntry(
|
||||||
row.DatabaseId,
|
DatabaseId,
|
||||||
JSON.stringify(row.RowData),
|
JSON.stringify(row),
|
||||||
row.UUID || DatabaseEntry.getUUID(),
|
DatabaseEntry.getUUID(),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -911,6 +911,13 @@ export class ApiService {
|
|||||||
);
|
);
|
||||||
|
|
||||||
await newColumnDef.save();
|
await newColumnDef.save();
|
||||||
|
|
||||||
|
// Add the column to the database's column IDs
|
||||||
|
const parentDatabase = await this.db.databases.where({ UUID: DatabaseId }).first() as Database;
|
||||||
|
if ( parentDatabase ) {
|
||||||
|
parentDatabase.ColumnIds.push(newColumnDef.UUID);
|
||||||
|
await parentDatabase.save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user