feat: 全屏个股详情预览 + Tailwind 改版 + 账号鉴权
This commit is contained in:
37
backend/alembic/versions/208b0c5d302a_temp_full_schema.py
Normal file
37
backend/alembic/versions/208b0c5d302a_temp_full_schema.py
Normal file
@@ -0,0 +1,37 @@
|
||||
"""baseline existing business tables for fresh PostgreSQL databases
|
||||
|
||||
Revision ID: 208b0c5d302a
|
||||
Revises: 20260814_01
|
||||
Create Date: 2026-08-14 18:14:07.548098
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
|
||||
from app.db import Base
|
||||
from app import models # noqa: F401
|
||||
|
||||
|
||||
revision: str = '208b0c5d302a'
|
||||
down_revision: Union[str, Sequence[str], None] = '20260814_01'
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
# 线上库在引入 Alembic 前已有这些表,checkfirst 保证迁移无损;空库则完整创建。
|
||||
for table_name in (
|
||||
"candles",
|
||||
"backtest_runs",
|
||||
"stock_basic",
|
||||
"market_daily",
|
||||
"daily_snapshot",
|
||||
"trade_calendar",
|
||||
):
|
||||
Base.metadata.tables[table_name].create(bind=bind, checkfirst=True)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# 这些表可能包含迁移接管前的数据,禁止自动降级删除。
|
||||
pass
|
||||
Reference in New Issue
Block a user