add
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
set -e # 遇到错误立即退出
|
||||
|
||||
# 定义表名变量,可以根据需要修改
|
||||
TABLE_NAME="cn_pmi_records"
|
||||
TABLE_NAME="cn_pmi_a_records"
|
||||
|
||||
echo "🚀 启动Python容器执行create_table.py..."
|
||||
echo "📋 目标表名: ${TABLE_NAME}"
|
||||
|
||||
@@ -7,8 +7,8 @@ create.py - 动态生成PostgreSQL建表SQL语句
|
||||
import os
|
||||
import re
|
||||
|
||||
# 1. 定义表名称变量,方便调整
|
||||
table_name = "cn_pmi_records" # 可以根据需要修改表名
|
||||
# 1. 从环境变量获取表名,如果没有设置则使用默认值
|
||||
table_name = os.environ.get('TABLE_NAME', 'records')
|
||||
|
||||
# 2. 定义SQL模板
|
||||
sql_template = f"""DO $$
|
||||
|
||||
Reference in New Issue
Block a user