This commit is contained in:
vipg
2025-12-26 16:11:21 +08:00
parent e51805749a
commit 004a9e6bb5
2 changed files with 7 additions and 16 deletions

View File

@@ -26,7 +26,7 @@ docker run --rm \
-v "${PROJECT_ROOT}/infra/postgres/sql:/app/infra/postgres/sql" \ -v "${PROJECT_ROOT}/infra/postgres/sql:/app/infra/postgres/sql" \
-w /app \ -w /app \
python:3.13.7-alpine3.22 \ python:3.13.7-alpine3.22 \
bash -c " sh -c "
echo '📋 容器内环境信息:' echo '📋 容器内环境信息:'
python --version python --version
echo '' echo ''

View File

@@ -1,12 +1,3 @@
-- =========================================================
-- table.sql (PostgreSQL 17.4+)
-- =========================================================
\pset pager off
\timing on
\c postgres;
CREATE EXTENSION IF NOT EXISTS "moddatetime" SCHEMA public;
DO $$ DO $$
BEGIN BEGIN
RAISE NOTICE '🚀============ 数据库表部署开始 ============🚀'; RAISE NOTICE '🚀============ 数据库表部署开始 ============🚀';
@@ -29,7 +20,7 @@ BEGIN
); );
-- 3 触发器:自动刷新 updated_at -- 3 触发器:自动刷新 updated_at
CREATE TRIGGER trg_cn_futures_trading_records_updated_at CREATE TRIGGER trg_cn_futures_trading_records_at
BEFORE UPDATE ON cn_futures_trading_records BEFORE UPDATE ON cn_futures_trading_records
FOR EACH ROW FOR EACH ROW
EXECUTE FUNCTION moddatetime(updated_at); EXECUTE FUNCTION moddatetime(updated_at);