diff --git a/Sources/Shared/Panels/PanelsUpdater.swift b/Sources/Shared/Panels/PanelsUpdater.swift index 7718ee6b0..a6b616528 100644 --- a/Sources/Shared/Panels/PanelsUpdater.swift +++ b/Sources/Shared/Panels/PanelsUpdater.swift @@ -1,4 +1,5 @@ import Foundation +import GRDB import PromiseKit public protocol PanelsUpdaterProtocol { @@ -36,6 +37,8 @@ final class PanelsUpdater: PanelsUpdaterProtocol { do { try Current.database.write { db in + try AppPanel.filter(Column(DatabaseTables.AppPanel.serverId.rawValue) == server.identifier.rawValue) + .deleteAll(db) for panel in appPanels { try panel.save(db) }