style: apply ruff format across backend + scripts (line-length 100)
Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in .git-blame-ignore-revs (next commit) so git blame skips it.
This commit is contained in:
@@ -10,6 +10,7 @@ still hangs off a `media_assets` row (with `source_kind='edit'` and a per-user c
|
||||
existing file-serve / ref-count / GC / quota machinery is reused unchanged. `source_job_id` /
|
||||
`source_asset_id` point at the parent download; `edit_spec` is the trim/crop recipe.
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
@@ -24,16 +25,10 @@ depends_on: Union[str, Sequence[str], None] = None
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"download_jobs",
|
||||
sa.Column(
|
||||
"job_kind", sa.String(length=16), server_default="download", nullable=False
|
||||
),
|
||||
)
|
||||
op.add_column(
|
||||
"download_jobs", sa.Column("source_job_id", sa.Integer(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
"download_jobs", sa.Column("source_asset_id", sa.Integer(), nullable=True)
|
||||
sa.Column("job_kind", sa.String(length=16), server_default="download", nullable=False),
|
||||
)
|
||||
op.add_column("download_jobs", sa.Column("source_job_id", sa.Integer(), nullable=True))
|
||||
op.add_column("download_jobs", sa.Column("source_asset_id", sa.Integer(), nullable=True))
|
||||
op.add_column("download_jobs", sa.Column("edit_spec", sa.JSON(), nullable=True))
|
||||
op.create_foreign_key(
|
||||
"fk_download_jobs_source_job",
|
||||
@@ -54,12 +49,8 @@ def upgrade() -> None:
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_constraint(
|
||||
"fk_download_jobs_source_asset", "download_jobs", type_="foreignkey"
|
||||
)
|
||||
op.drop_constraint(
|
||||
"fk_download_jobs_source_job", "download_jobs", type_="foreignkey"
|
||||
)
|
||||
op.drop_constraint("fk_download_jobs_source_asset", "download_jobs", type_="foreignkey")
|
||||
op.drop_constraint("fk_download_jobs_source_job", "download_jobs", type_="foreignkey")
|
||||
op.drop_column("download_jobs", "edit_spec")
|
||||
op.drop_column("download_jobs", "source_asset_id")
|
||||
op.drop_column("download_jobs", "source_job_id")
|
||||
|
||||
Reference in New Issue
Block a user