      * Clean up any metadata.
      */
     public func onRemovedAccount() -> Success {
-        return succeed()
+        return
+
+        // Clone all the mirrors so we don't lose data.
+        self.cloneMirrorToOverlay(whereClause: nil, args: nil)
+
+        // Drop all of the mirror data.
+        >>> { self.db.run("DELETE FROM \(TableLoginsMirror)") }
+
+        // Mark all of the local data as new.
+        >>> { self.db.run("UPDATE \(TableLoginsLocal) SET sync_status = \(SyncStatus.New.rawValue)") }
     }
 }

    }

    private func cloneMirrorToOverlay(guid: GUID) -> Deferred<Result<Int>> {
        let shared =
        "guid " +
        ", hostname" +

        let sql = "INSERT OR IGNORE INTO \(TableLoginsLocal) " +
        "(\(shared)\(local)) " +
        "SELECT \(shared), NULL AS local_modified, 0 AS is_deleted, 0 AS sync_status " +
        "FROM \(TableLoginsMirror) " +
        (whereClause ?? "")

        return self.db.write(sql, withArgs: args)
    }

