formatted project by python-black

This commit is contained in:
2026-11-10 09:52:42 +03:00
parent 7cd02da51d
commit 9899ee4676
66 changed files with 2517 additions and 944 deletions
@@ -11,7 +11,9 @@ depends_on = None
def upgrade() -> None:
op.add_column("attachments", sa.Column("crop_key", sa.String(128), nullable=True))
op.add_column("attachments", sa.Column("optimized_key", sa.String(128), nullable=True))
op.add_column(
"attachments", sa.Column("optimized_key", sa.String(128), nullable=True)
)
# Старый staging сменяется надёжным ready-оригиналом, но не теряется из журнала cleanup.
op.execute("""
INSERT INTO upload_intents (id, object_key)
@@ -37,7 +39,11 @@ def upgrade() -> None:
def downgrade() -> None:
active = op.get_bind().scalar(sa.text("SELECT count(*) FROM attachments WHERE status IN ('queued', 'processing')"))
active = op.get_bind().scalar(
sa.text(
"SELECT count(*) FROM attachments WHERE status IN ('queued', 'processing')"
)
)
if active:
raise RuntimeError("Перед downgrade необходимо завершить активные задания")
op.execute("""