All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
"""Add ap_delivery_log table for idempotent federation delivery
|
|
|
|
Revision ID: s9q7n3o5p6
|
|
Revises: r8p6m2n4o5
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "s9q7n3o5p6"
|
|
down_revision = "r8p6m2n4o5"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.create_table(
|
|
"ap_delivery_log",
|
|
sa.Column("id", sa.Integer, primary_key=True, autoincrement=True),
|
|
sa.Column("activity_id", sa.Integer, sa.ForeignKey("ap_activities.id", ondelete="CASCADE"), nullable=False),
|
|
sa.Column("inbox_url", sa.String(512), nullable=False),
|
|
sa.Column("status_code", sa.Integer, nullable=True),
|
|
sa.Column("delivered_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.func.now()),
|
|
sa.UniqueConstraint("activity_id", "inbox_url", name="uq_delivery_activity_inbox"),
|
|
)
|
|
op.create_index("ix_ap_delivery_activity", "ap_delivery_log", ["activity_id"])
|
|
|
|
|
|
def downgrade():
|
|
op.drop_index("ix_ap_delivery_activity", table_name="ap_delivery_log")
|
|
op.drop_table("ap_delivery_log")
|