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() {
|
||||
this.editorService.registerNodeEditor(this.nodeId, this).then(() => {
|
||||
|
||||
console.log('database editor', this);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -853,9 +853,9 @@ export class ApiService {
|
||||
|
||||
for ( const row of rowData ) {
|
||||
const newDatabaseEntry = new DatabaseEntry(
|
||||
row.DatabaseId,
|
||||
JSON.stringify(row.RowData),
|
||||
row.UUID || DatabaseEntry.getUUID(),
|
||||
DatabaseId,
|
||||
JSON.stringify(row),
|
||||
DatabaseEntry.getUUID(),
|
||||
true
|
||||
);
|
||||
|
||||
@ -911,6 +911,13 @@ export class ApiService {
|
||||
);
|
||||
|
||||
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