From 5e2eb7d67ae933b7566f1944d0bb7744da03d586 Mon Sep 17 00:00:00 2001 From: aura Date: Tue, 17 Feb 2026 23:42:09 +0100 Subject: move source stuff to its own folder --- .../scripting/gokz-localdb/db/create_tables.sp | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source/sourcemod/scripting/gokz-localdb/db/create_tables.sp (limited to 'source/sourcemod/scripting/gokz-localdb/db/create_tables.sp') diff --git a/source/sourcemod/scripting/gokz-localdb/db/create_tables.sp b/source/sourcemod/scripting/gokz-localdb/db/create_tables.sp new file mode 100644 index 0000000..2138830 --- /dev/null +++ b/source/sourcemod/scripting/gokz-localdb/db/create_tables.sp @@ -0,0 +1,36 @@ +/* + Table creation and alteration. +*/ + + + +void DB_CreateTables() +{ + Transaction txn = SQL_CreateTransaction(); + + switch (g_DBType) + { + case DatabaseType_SQLite: + { + txn.AddQuery(sqlite_players_create); + txn.AddQuery(sqlite_maps_create); + txn.AddQuery(sqlite_mapcourses_create); + txn.AddQuery(sqlite_times_create); + txn.AddQuery(sqlite_jumpstats_create); + txn.AddQuery(sqlite_vbpos_create); + txn.AddQuery(sqlite_startpos_create); + } + case DatabaseType_MySQL: + { + txn.AddQuery(mysql_players_create); + txn.AddQuery(mysql_maps_create); + txn.AddQuery(mysql_mapcourses_create); + txn.AddQuery(mysql_times_create); + txn.AddQuery(mysql_jumpstats_create); + txn.AddQuery(mysql_vbpos_create); + txn.AddQuery(mysql_startpos_create); + } + } + + SQL_ExecuteTransaction(gH_DB, txn, _, DB_TxnFailure_Generic, _, DBPrio_High); +} \ No newline at end of file -- cgit v1.2.3