[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
30
ARCHIVE_legacy_scripts/migrate_personas_v2.py
Normal file
30
ARCHIVE_legacy_scripts/migrate_personas_v2.py
Normal file
@@ -0,0 +1,30 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user