summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-11-22 13:58:17 +0000
committerSadie Powell <sadie@witchery.services>2024-11-22 14:09:26 +0000
commita27be92e4b406e4bee8a0d56bda00eae335c80a5 (patch)
tree7b46357cda67512f38e3e31e452eda358501c27c /modules
parentfaf0ad5f350bbb000ac96226d8017b0da19dd7f1 (diff)
Skip removed columns when migrating the database schema.
Diffstat (limited to 'modules')
-rw-r--r--modules/extra/mysql.cpp5
1 files changed, 5 insertions, 0 deletions
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<Query> 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;