Server: basic implementation. Not tested => no python installed; bugfix in ESP (uvicorn on port 8090)
This commit is contained in:
1 parent
3694cdf207
commit
8a51e3d95e
38 files changed
+2442
-21
No files matched your search
@@ -0,0 +1,42 @@
|
||||
"""Baseline schema: SPEC 3 plus the SPEC 0 additions.
|
||||
|
||||
Revision ID: 0001
|
||||
Revises:
|
||||
Create Date: 2026-09-20
|
||||
|
||||
This baseline builds the schema from ``Base.metadata`` rather than from
|
||||
hand-written DDL. That is a deliberate, bounded exception, and it applies to
|
||||
this revision only:
|
||||
|
||||
* it cannot drift from the models, which hand-written DDL silently can;
|
||||
* ``tests/test_schema_matches_models.py`` asserts that a freshly migrated
|
||||
database produces an empty autogenerate diff, so the guarantee is checked
|
||||
rather than assumed;
|
||||
* every subsequent revision is a normal autogenerated one with real
|
||||
``op.*`` operations.
|
||||
|
||||
If you would rather have explicit DDL here, run
|
||||
``alembic revision --autogenerate`` against an empty database once Postgres is
|
||||
up and replace this file with the result. The drift test passes either way.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
from poorbird.models import Base
|
||||
|
||||
revision: str = "0001"
|
||||
down_revision: str | None = None
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
Base.metadata.create_all(bind=op.get_bind())
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
Base.metadata.drop_all(bind=op.get_bind())
|
||||
Reference in new issue
Block a user