This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
|
||||
import os
|
||||
import psycopg2
|
||||
|
||||
def check_schema():
|
||||
try:
|
||||
db_url = os.environ.get('DATABASE_URL', 'postgresql://suggestbet:SuGGesT2026SecuRe@localhost:15432/boilerplate_db')
|
||||
conn = psycopg2.connect(db_url)
|
||||
cursor = conn.cursor()
|
||||
|
||||
cursor.execute("SELECT column_name FROM information_schema.columns WHERE table_name = 'matches'")
|
||||
cols = [r[0] for r in cursor.fetchall()]
|
||||
print("Columns in 'matches':")
|
||||
print(cols)
|
||||
|
||||
# Check specifically for HT
|
||||
ht_cols = [c for c in cols if 'ht' in c or 'half' in c]
|
||||
print(f"\nFound Halftime Columns: {ht_cols}")
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_schema()
|
||||
Reference in New Issue
Block a user