diff options
| author | navewindre <nw@moneybot.cc> | 2023-12-04 18:06:10 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-12-04 18:06:10 +0100 |
| commit | aef0d1c1268ab7d4bc18996c9c6b4da16a40aadc (patch) | |
| tree | 43e766b51704f4ab8b383583bdc1871eeeb9c698 /sourcemod/scripting/gokz-localranks/db/create_tables.sp | |
| parent | 38f1140c11724da05a23a10385061200b907cf6e (diff) | |
bbbbbbbbwaaaaaaaaaaa
Diffstat (limited to 'sourcemod/scripting/gokz-localranks/db/create_tables.sp')
| -rw-r--r-- | sourcemod/scripting/gokz-localranks/db/create_tables.sp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sourcemod/scripting/gokz-localranks/db/create_tables.sp b/sourcemod/scripting/gokz-localranks/db/create_tables.sp new file mode 100644 index 0000000..a15f67c --- /dev/null +++ b/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 |
