Migrations 047-051: - 047: Add is_shared to calendars - 048: Create calendar_members table (permissions, status, constraints) - 049: Create event_locks table (5min TTL, permanent owner locks) - 050: Expand notification CHECK (calendar_invite types) - 051: Add updated_by to calendar_events + updated_at index New models: CalendarMember, EventLock Updated models: Calendar (is_shared, members), CalendarEvent (updated_by), Notification (3 new types) New schemas: shared_calendar.py (invite, respond, member, lock, sync) Updated schemas: calendar.py (is_shared, sharing response fields) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
420 B
Python
24 lines
420 B
Python
"""Add is_shared to calendars
|
|
|
|
Revision ID: 047
|
|
Revises: 046
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "047"
|
|
down_revision = "046"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"calendars",
|
|
sa.Column("is_shared", sa.Boolean(), nullable=False, server_default="false"),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("calendars", "is_shared")
|