[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:
41
ARCHIVE_legacy_scripts/fix_benni_data.py
Normal file
41
ARCHIVE_legacy_scripts/fix_benni_data.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
import json
|
||||
|
||||
# Setup DB
|
||||
DB_PATH = "sqlite:///companies_v3_fixed_2.db"
|
||||
engine = create_engine(DB_PATH)
|
||||
SessionLocal = sessionmaker(bind=engine)
|
||||
session = SessionLocal()
|
||||
|
||||
from sqlalchemy import Column, Integer, String
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
class Company(Base):
|
||||
__tablename__ = "companies"
|
||||
id = Column(Integer, primary_key=True)
|
||||
street = Column(String)
|
||||
zip_code = Column(String)
|
||||
|
||||
def fix_benni():
|
||||
company_id = 33
|
||||
print(f"🔧 Fixing Address for Company ID {company_id}...")
|
||||
|
||||
company = session.query(Company).filter_by(id=company_id).first()
|
||||
if not company:
|
||||
print("❌ Company not found.")
|
||||
return
|
||||
|
||||
# Hardcoded from previous check_benni.py output to be safe/fast
|
||||
# "street": "Eriagstraße 58", "zip": "85053"
|
||||
|
||||
company.street = "Eriagstraße 58"
|
||||
company.zip_code = "85053"
|
||||
|
||||
session.commit()
|
||||
print(f"✅ Database updated: Street='{company.street}', Zip='{company.zip_code}'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
fix_benni()
|
||||
Reference in New Issue
Block a user