Loading plugins/staticpage/static.cpp +7 −1 Changes for plugins/staticpage/static.cpp: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -64,8 +64,14 @@ void blogi::StaticPage::initPlugin(){ << ");"; Args->database[0]->exec(sql,res); // Portable migration for tables created before llms_txt existed: plain // ADD COLUMN (no "IF NOT EXISTS") fails harmlessly with "duplicate column" // when it's already there, but unlike "ADD COLUMN IF NOT EXISTS" it works // on MySQL server versions that don't support that conditional syntax at // all — those would otherwise throw an ALTER TABLE syntax error here, // silently swallowed by the catch, leaving the column permanently missing. sql.clear(); res.clear(); sql << "ALTER TABLE static_content ADD COLUMN IF NOT EXISTS llms_txt " << longTextType << ";"; sql << "ALTER TABLE static_content ADD COLUMN llms_txt " << longTextType << ";"; try { Args->database[0]->exec(sql,res); } catch(...) {} } Loading Loading
plugins/staticpage/static.cpp +7 −1 Changes for plugins/staticpage/static.cpp: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -64,8 +64,14 @@ void blogi::StaticPage::initPlugin(){ << ");"; Args->database[0]->exec(sql,res); // Portable migration for tables created before llms_txt existed: plain // ADD COLUMN (no "IF NOT EXISTS") fails harmlessly with "duplicate column" // when it's already there, but unlike "ADD COLUMN IF NOT EXISTS" it works // on MySQL server versions that don't support that conditional syntax at // all — those would otherwise throw an ALTER TABLE syntax error here, // silently swallowed by the catch, leaving the column permanently missing. sql.clear(); res.clear(); sql << "ALTER TABLE static_content ADD COLUMN IF NOT EXISTS llms_txt " << longTextType << ";"; sql << "ALTER TABLE static_content ADD COLUMN llms_txt " << longTextType << ";"; try { Args->database[0]->exec(sql,res); } catch(...) {} } Loading