Initial commit – AufmaßCreater v2.35

This commit is contained in:
2026-06-10 11:03:43 +02:00
commit 84c933ea9c
2823 changed files with 490495 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
"""Add formel_typ, formel columns to positionen."""
import sqlite3, os
db_path = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'data', 'aufmass.db'))
if not os.path.exists(db_path):
print("No DB found, skipping."); exit(0)
conn = sqlite3.connect(db_path); c = conn.cursor()
c.execute("PRAGMA table_info(positionen)")
cols = [r[1] for r in c.fetchall()]
for col, typ in [('formel_typ','VARCHAR(10)'), ('formel','VARCHAR(300)')]:
if col not in cols:
c.execute(f"ALTER TABLE positionen ADD COLUMN {col} {typ}")
print(f"Added {col} to positionen")
conn.commit(); conn.close()
print("Migration done.")