chore: initial baseline with P0-safety .gitignore

This commit is contained in:
Simon
2026-06-14 16:49:18 +08:00
commit 63262292d7
510 changed files with 146008 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import sqlite3
conn = sqlite3.connect('it_smart_desk.db')
cursor = conn.cursor()
# Employee 表新增字段
alterations = [
("it_level", "VARCHAR(20)", "'silver'"),
("it_level_source", "VARCHAR(20)", "'system'"),
("notes", "JSON", "'{}'"),
]
for col_name, col_type, default_val in alterations:
try:
cursor.execute(f"ALTER TABLE employees ADD COLUMN {col_name} {col_type} NOT NULL DEFAULT {default_val}")
print(f"ADDED: employees.{col_name}")
except sqlite3.OperationalError as e:
if "duplicate column" in str(e).lower():
print(f"SKIP: employees.{col_name} already exists")
else:
print(f"ERROR: employees.{col_name}{e}")
conn.commit()
conn.close()
print("Done.")