- Organisiert eine Vielzahl von Skripten aus dem Root-Verzeichnis in thematische Unterordner, um die Übersichtlichkeit zu verbessern und die Migration vorzubereiten. - Verschiebt SuperOffice-bezogene Test- und Hilfsskripte in . - Verschiebt Notion-bezogene Synchronisations- und Import-Skripte in . - Archiviert eindeutig veraltete und ungenutzte Skripte in . - Die zentralen Helfer und bleiben im Root, da sie von mehreren Tools als Abhängigkeit genutzt werden.
31 lines
826 B
Python
31 lines
826 B
Python
import sqlite3
|
|
import os
|
|
|
|
DB_PATH = "/app/companies_v3_fixed_2.db"
|
|
|
|
def migrate_personas():
|
|
print(f"Adding new columns to 'personas' table in {DB_PATH}...")
|
|
conn = sqlite3.connect(DB_PATH)
|
|
cursor = conn.cursor()
|
|
|
|
columns_to_add = [
|
|
("description", "TEXT"),
|
|
("convincing_arguments", "TEXT"),
|
|
("typical_positions", "TEXT"),
|
|
("kpis", "TEXT")
|
|
]
|
|
|
|
for col_name, col_type in columns_to_add:
|
|
try:
|
|
cursor.execute(f"ALTER TABLE personas ADD COLUMN {col_name} {col_type}")
|
|
print(f" Added column: {col_name}")
|
|
except sqlite3.OperationalError:
|
|
print(f" Column {col_name} already exists.")
|
|
|
|
conn.commit()
|
|
conn.close()
|
|
print("Migration complete.")
|
|
|
|
if __name__ == "__main__":
|
|
migrate_personas()
|