31 lines
707 B
Python
31 lines
707 B
Python
"""Таблица feed_quality_settings + импорт из data/wesp_feed_quality_settings.json.
|
|
|
|
Revision ID: feed_quality_settings
|
|
Revises: wesp_2_0
|
|
Create Date: 2026-06-07
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from alembic import op
|
|
|
|
from app.services.feed_quality.settings_store import ensure_feed_quality_settings_table
|
|
|
|
|
|
revision = "feed_quality_settings"
|
|
down_revision = "wesp_2_0"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade(**kw) -> None:
|
|
if kw.get("tag") == "reports":
|
|
return
|
|
ensure_feed_quality_settings_table(op.get_bind(), import_json=True)
|
|
|
|
|
|
def downgrade(**kw) -> None:
|
|
if kw.get("tag") == "reports":
|
|
return
|
|
op.drop_table("feed_quality_settings")
|