INNER CODE UNIT · Python
_init_local_db
infobyte/emploleaks · emploleaks.py:304
def _init_local_db(self):
"""Initialize the local SQLite database with required tables."""
cur = self.local_conn.cursor()
# Crear tabla de compañías si no existe
cur.execute("""
CREATE TABLE IF NOT EXISTS companies (
company_id INTEGER PRIMARY KEY AUTOINCREMENT,
company_name TEXT UNIQUE NOT NULL
)
""")
# Crear tabla de empleados si no existe
cur.execute("""
CREATE TABLE IF NOT EXISTS employees (
employee_id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
title TEXT,