修正
This commit is contained in:
25
backend/check_insurance_rates.py
Normal file
25
backend/check_insurance_rates.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import psycopg
|
||||
|
||||
conn = psycopg.connect(
|
||||
host='192.168.0.61',
|
||||
port=55432,
|
||||
dbname='njts_acct',
|
||||
user='njts_app',
|
||||
password='njts_app2025'
|
||||
)
|
||||
|
||||
cur = conn.cursor()
|
||||
cur.execute("""
|
||||
SELECT column_name, data_type
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'insurance_rates'
|
||||
ORDER BY ordinal_position
|
||||
""")
|
||||
|
||||
rows = cur.fetchall()
|
||||
print('insurance_ratesテーブルのカラム:')
|
||||
for r in rows:
|
||||
print(f' {r[0]}: {r[1]}')
|
||||
|
||||
cur.close()
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user