1.2.0: Refined all 6D calcs and UI/UX Experiences.
This commit is contained in:
30
scripts/update_l2_schema_utility.py
Normal file
30
scripts/update_l2_schema_utility.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
import sqlite3
|
||||
from web.config import Config
|
||||
|
||||
conn = sqlite3.connect(Config.DB_L2_PATH)
|
||||
cursor = conn.cursor()
|
||||
|
||||
columns = [
|
||||
'util_flash_usage',
|
||||
'util_smoke_usage',
|
||||
'util_molotov_usage',
|
||||
'util_he_usage',
|
||||
'util_decoy_usage'
|
||||
]
|
||||
|
||||
for col in columns:
|
||||
try:
|
||||
cursor.execute(f"ALTER TABLE fact_match_players ADD COLUMN {col} INTEGER DEFAULT 0")
|
||||
print(f"Added column {col}")
|
||||
except sqlite3.OperationalError as e:
|
||||
if "duplicate column name" in str(e):
|
||||
print(f"Column {col} already exists.")
|
||||
else:
|
||||
print(f"Error adding {col}: {e}")
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user