mirror of
https://github.com/complexcaresolutions/dak.c2s.git
synced 2026-03-17 21:53:41 +00:00
- Initialize Alembic with MySQL/MariaDB-targeted configuration - Configure env.py to read DB URL from app.config.get_settings() - Create initial migration (062ccae5457b) for all 11 tables: users, refresh_tokens, invitation_links, allowed_domains, cases, case_icd_codes, weekly_reports, yearly_summary, import_log, audit_log, notifications - Include all indexes, foreign keys, check constraints, and MySQL text prefix index (icd(20)) - Add seed script (scripts/init_db.py) for dak.de domain whitelist - DB apply deferred: MariaDB on Hetzner 1 not reachable from dev Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
635 B
Mako
26 lines
635 B
Mako
"""${message}
|
|
|
|
Revision ID: ${up_revision}
|
|
Revises: ${down_revision | comma,n}
|
|
Create Date: ${create_date}
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
${imports if imports else ""}
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = ${repr(up_revision)}
|
|
down_revision: Union[str, None] = ${repr(down_revision)}
|
|
branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
|
|
depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
|
|
|
|
|
|
def upgrade() -> None:
|
|
${upgrades if upgrades else "pass"}
|
|
|
|
|
|
def downgrade() -> None:
|
|
${downgrades if downgrades else "pass"}
|
|
|