Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ def get_active_csv_path():
|
|
| 58 |
logging.info(f"[CSV] Usando arquivo CSV padrão: {DEFAULT_CSV_PATH}")
|
| 59 |
return DEFAULT_CSV_PATH
|
| 60 |
|
| 61 |
-
def
|
| 62 |
if os.path.exists(sql_db_path):
|
| 63 |
print("Banco de dados SQL já existe. Carregando...")
|
| 64 |
return create_engine(f"sqlite:///{sql_db_path}")
|
|
|
|
| 58 |
logging.info(f"[CSV] Usando arquivo CSV padrão: {DEFAULT_CSV_PATH}")
|
| 59 |
return DEFAULT_CSV_PATH
|
| 60 |
|
| 61 |
+
def create_engine_and_load_db(csv_path, sql_db_path):
|
| 62 |
if os.path.exists(sql_db_path):
|
| 63 |
print("Banco de dados SQL já existe. Carregando...")
|
| 64 |
return create_engine(f"sqlite:///{sql_db_path}")
|