微信小程序页面迁移校验之前 P5任务处理之前
This commit is contained in:
12
scripts/ops/_check_settle_cols.py
Normal file
12
scripts/ops/_check_settle_cols.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""查 dwd_settlement_head 列"""
|
||||
import os
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
import psycopg2
|
||||
load_dotenv(Path(__file__).resolve().parents[2] / ".env")
|
||||
conn = psycopg2.connect(os.environ["PG_DSN"], connect_timeout=5)
|
||||
cur = conn.cursor()
|
||||
cur.execute("SELECT column_name, data_type FROM information_schema.columns WHERE table_schema='dwd' AND table_name='dwd_settlement_head' ORDER BY ordinal_position")
|
||||
for r in cur.fetchall():
|
||||
print(r)
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user