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)
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
|
|
# Alembic migration script template
|
|
|
|
"""Add calendar_entry_posts association table
|
|
|
|
Revision ID: 6cb124491c9d
|
|
Revises: 0011_add_entry_tickets
|
|
Create Date: 2025-12-07 03:40:49.194068
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects.postgresql import TIMESTAMP
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '6cb124491c9d'
|
|
down_revision = '0011_add_entry_tickets'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
def upgrade() -> None:
|
|
op.create_table(
|
|
'calendar_entry_posts',
|
|
sa.Column('id', sa.Integer(), primary_key=True, autoincrement=True),
|
|
sa.Column('entry_id', sa.Integer(), sa.ForeignKey('calendar_entries.id', ondelete='CASCADE'), nullable=False),
|
|
sa.Column('post_id', sa.Integer(), sa.ForeignKey('posts.id', ondelete='CASCADE'), nullable=False),
|
|
sa.Column('created_at', TIMESTAMP(timezone=True), nullable=False, server_default=sa.func.now()),
|
|
sa.Column('deleted_at', TIMESTAMP(timezone=True), nullable=True),
|
|
)
|
|
op.create_index('ix_entry_posts_entry_id', 'calendar_entry_posts', ['entry_id'])
|
|
op.create_index('ix_entry_posts_post_id', 'calendar_entry_posts', ['post_id'])
|
|
|
|
def downgrade() -> None:
|
|
op.drop_index('ix_entry_posts_post_id', 'calendar_entry_posts')
|
|
op.drop_index('ix_entry_posts_entry_id', 'calendar_entry_posts')
|
|
op.drop_table('calendar_entry_posts')
|