1
0
Fork 0
mirror of synced 2024-08-12 08:31:27 +12:00

Fix overriding viewv2 schemas

This commit is contained in:
Adria Navarro 2023-08-09 12:53:08 +03:00
parent 4db33b9d75
commit dcf26dd0cb

View file

@ -97,7 +97,13 @@ export async function save(ctx: any) {
// update schema of non-statistics views when new columns are added
for (let view in tableToSave.views) {
const tableView = tableToSave.views[view]
if (!tableView || sdk.views.isV2(tableView)) continue
if (!tableView) continue
if (sdk.views.isV2(tableView)) {
// We don't want to modify views from the tables controller
tableToSave.views[view] = oldTable!.views![view]
continue
}
if (
(tableView.schema as ViewStatisticsSchema).group ||