лаба на 3

This commit is contained in:
2026-11-23 21:17:22 +03:00
parent 470d9d6f1e
commit d5416a6cc2
52 changed files with 5197 additions and 0 deletions
@@ -0,0 +1,33 @@
from alembic import op
import sqlalchemy as sa
revision = "a7b12026a003"
down_revision = "a6b12026a002"
branch_labels = None
depends_on = None
def upgrade():
op.add_column(
"attachment_jobs",
sa.Column("failed_published_at", sa.DateTime(timezone=True)),
)
op.create_index(
"ix_attachment_jobs_failed_unpublished",
"attachment_jobs",
["created_at"],
postgresql_where=sa.text(
"status = 'failed' AND failed_published_at IS NULL"
),
)
def downgrade():
op.drop_index(
"ix_attachment_jobs_failed_unpublished",
table_name="attachment_jobs",
)
op.drop_column("attachment_jobs", "failed_published_at")