summaryrefslogtreecommitdiff
path: root/sourcemod/scripting/gokz-localranks/db/create_tables.sp
blob: a15f67c97596d9980ab3ab849b95b2e04f42cdb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
}