fix: migrate as durable database owner
All checks were successful
Build and Publish Container Image / build-and-push (push) Successful in 37s
All checks were successful
Build and Publish Container Image / build-and-push (push) Successful in 37s
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028f0-a42f-7582-89a8-ebaad7343834
This commit is contained in:
parent
7a57d9a30f
commit
4143f7c004
5 changed files with 52 additions and 6 deletions
|
|
@ -7,8 +7,8 @@ Create Date: 2026-08-22
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "0001"
|
||||
down_revision = None
|
||||
|
|
@ -46,7 +46,10 @@ def upgrade() -> None:
|
|||
sa.Column("legacy_id", sa.String(length=100), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["repo_id"], ["repositories.id"], name=op.f("fk_snapshots_repo_id_repositories"), ondelete="RESTRICT"
|
||||
["repo_id"],
|
||||
["repositories.id"],
|
||||
name=op.f("fk_snapshots_repo_id_repositories"),
|
||||
ondelete="RESTRICT",
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id", name=op.f("pk_snapshots")),
|
||||
sa.UniqueConstraint("legacy_id", name=op.f("uq_snapshots_legacy_id")),
|
||||
|
|
@ -66,10 +69,16 @@ def upgrade() -> None:
|
|||
sa.Column("source_path", sa.Text(), nullable=True),
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
["repo_id"], ["repositories.id"], name=op.f("fk_entries_repo_id_repositories"), ondelete="RESTRICT"
|
||||
["repo_id"],
|
||||
["repositories.id"],
|
||||
name=op.f("fk_entries_repo_id_repositories"),
|
||||
ondelete="RESTRICT",
|
||||
),
|
||||
sa.ForeignKeyConstraint(
|
||||
["snapshot_id"], ["snapshots.id"], name=op.f("fk_entries_snapshot_id_snapshots"), ondelete="RESTRICT"
|
||||
["snapshot_id"],
|
||||
["snapshots.id"],
|
||||
name=op.f("fk_entries_snapshot_id_snapshots"),
|
||||
ondelete="RESTRICT",
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id", name=op.f("pk_entries")),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue