Spaces:
Running
Running
File size: 576 Bytes
8642c86 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import os
from dotenv import load_dotenv
from src.db_connector import Database
# Load your actual database connection
db = Database()
print("\n--- ๐ REAL DATABASE SCHEMA ---")
try:
# Get all tables
tables = db.get_tables()
for table in tables:
print(f"\n๐ TABLE: {table}")
# Get columns for this table
columns = db.get_table_schema(table)
for col in columns:
print(f" - {col}")
print("\n-------------------------------")
except Exception as e:
print(f"โ Error reading schema: {e}") |