summaryrefslogtreecommitdiff
path: root/source/sourcemod/scripting/gokz-localranks/db/create_tables.sp
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-02-17 23:42:09 +0100
committeraura <nw@moneybot.cc>2026-02-17 23:42:09 +0100
commit5e2eb7d67ae933b7566f1944d0bb7744da03d586 (patch)
tree054acff1113270a9cd07933df760f3768c1b6853 /source/sourcemod/scripting/gokz-localranks/db/create_tables.sp
parent341db13a008dc12bb22ceb50452d93d01476308c (diff)
move source stuff to its own folder
Diffstat (limited to 'source/sourcemod/scripting/gokz-localranks/db/create_tables.sp')
-rw-r--r--source/sourcemod/scripting/gokz-localranks/db/create_tables.sp27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/sourcemod/scripting/gokz-localranks/db/create_tables.sp b/source/sourcemod/scripting/gokz-localranks/db/create_tables.sp
new file mode 100644
index 0000000..a15f67c
--- /dev/null
+++ b/source/sourcemod/scripting/gokz-localranks/db/create_tables.sp
@@ -0,0 +1,27 @@
+/*
+ Table creation and alteration.
+*/
+
+
+
+void DB_CreateTables()
+{
+ Transaction txn = SQL_CreateTransaction();
+
+ // Create/alter database tables
+ switch (g_DBType)
+ {
+ case DatabaseType_SQLite:
+ {
+ txn.AddQuery(sqlite_maps_alter1);
+ }
+ case DatabaseType_MySQL:
+ {
+ txn.AddQuery(mysql_maps_alter1);
+ }
+ }
+
+ // No error logs for this transaction as it will always throw an error
+ // if the column already exists, which is more annoying than helpful.
+ SQL_ExecuteTransaction(gH_DB, txn, _, _, _, DBPrio_High);
+} \ No newline at end of file