31 lines
995 B
Python
31 lines
995 B
Python
import sys
|
|
import os
|
|
from sqlalchemy import create_engine, text, inspect
|
|
from sqlalchemy.orm import sessionmaker
|
|
|
|
# Add the backend directory to the python path
|
|
sys.path.append(os.path.join(os.getcwd(), 'backend'))
|
|
|
|
from core.config import settings
|
|
|
|
def check_equivalencies_columns():
|
|
engine = create_engine(str(settings.core_database_url))
|
|
inspector = inspect(engine)
|
|
|
|
try:
|
|
print("Checking equivalencies table columns...")
|
|
columns = inspector.get_columns('equivalencies', schema='a76')
|
|
for column in columns:
|
|
print(f"Column: {column['name']} - Type: {column['type']}")
|
|
|
|
print("\nChecking equivalency_items table columns...")
|
|
columns = inspector.get_columns('equivalency_items', schema='a76')
|
|
for column in columns:
|
|
print(f"Column: {column['name']} - Type: {column['type']}")
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
check_equivalencies_columns()
|