File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
addons/sourcemod/scripting/surftimer/db Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,13 @@ void CheckDatabaseForUpdates()
107107 return ;
108108 }
109109
110- LogMessage (" Version 14 looks good." );
110+ if (! SQL_FastQuery (g_hDb , " SELECT accountid FROM ck_vipadmins LIMIT 1" )) // TODO: Check for name/steamid64 column if exists or no more
111+ {
112+ db_upgradeDatabase (15 );
113+ return ;
114+ }
115+
116+ LogMessage (" Version 15 looks good." );
111117 }
112118}
113119
@@ -229,6 +235,15 @@ void db_upgradeDatabase(int ver, bool skipErrorCheck = false)
229235 return ;
230236 }
231237 }
238+ else if (ver == 15 )
239+ {
240+ SQL_FastQuery (g_hDb , " ALTER TABLE ck_bonus DROP COLUMN name;" );
241+ SQL_FastQuery (g_hDb , " ALTER TABLE ck_latestrecords DROP COLUMN name;" );
242+ SQL_FastQuery (g_hDb , " ALTER TABLE ck_playertimes DROP COLUMN name;" );
243+ SQL_FastQuery (g_hDb , " ALTER TABLE ck_prinfo DROP COLUMN name;" );
244+ SQL_FastQuery (g_hDb , " ALTER TABLE ck_playerrank DROP COLUMN steamid64;" );
245+ SQL_FastQuery (g_hDb , " ALTER TABLE ck_wrcps DROP COLUMN name;" );
246+ }
232247
233248 CheckDatabaseForUpdates ();
234249}
You can’t perform that action at this time.
0 commit comments