mergeWith method
Implementation
DatabaseSchema mergeWith(DatabaseSchema targetSchema) {
var tables = {...this.tables};
for (var key in targetSchema.tables.keys) {
if (tables.containsKey(key)) {
print('Database contains duplicate table $key. Make sure each table has a unique name.');
exit(1);
}
tables[key] = targetSchema.tables[key]!;
}
return DatabaseSchema(tables);
}