From a27be92e4b406e4bee8a0d56bda00eae335c80a5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 22 Nov 2024 13:58:17 +0000 Subject: Skip removed columns when migrating the database schema. --- modules/extra/mysql.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/extra/mysql.cpp') diff --git a/modules/extra/mysql.cpp b/modules/extra/mysql.cpp index 126714fb3..a477bcd09 100644 --- a/modules/extra/mysql.cpp +++ b/modules/extra/mysql.cpp @@ -456,6 +456,11 @@ std::vector MySQLService::CreateTable(const Anope::string &table, const D continue; // These columns are special and aren't part of the data. known_cols.insert(column); + if (data.data.count(column) == 0) + { + Log(LOG_DEBUG) << "mysql: Column has been removed from the data set: " << column; + continue; + } // We know the column exists but is the type correct? auto update = false; -- cgit