Files

24 lines
801 B
Python

import sqlite3
def fix_mappings():
conn = sqlite3.connect('/app/companies_v3_fixed_2.db')
cursor = conn.cursor()
# Neue Mappings für Geschäftsleitung und Verallgemeinerung
new_rules = [
('%leitung%', 'Wirtschaftlicher Entscheider'),
('%vorstand%', 'Wirtschaftlicher Entscheider'),
('%geschäftsleitung%', 'Wirtschaftlicher Entscheider'),
('%management%', 'Wirtschaftlicher Entscheider')
]
for pattern, role in new_rules:
cursor.execute("INSERT OR REPLACE INTO job_role_mappings (pattern, role, created_at) VALUES (?, ?, '2026-02-22T15:30:00')", (pattern, role))
conn.commit()
conn.close()
print("Mappings updated for Geschäftsleitung, Vorstand, Management.")
if __name__ == "__main__":
fix_mappings()