gabriel / musehub public
0009_stable_symbol_kind.py python
33 lines 869 B
Raw
sha256:0521dce9aca20da6ab4d9ebee6de75ab876bd82cddbc6bd4897d1ac6ecd11d3d docs(musehub#129): freeze Phase 1 OG repo card design Human 16 days ago
1 """stable_symbol_kind
2
3 Adds ``symbol_kind`` VARCHAR(64) column to ``musehub_intel_stable``
4 so each stability row carries the symbol kind (function, method, class, etc.)
5 derived from ``musehub_symbol_intel.symbol_kind``. NULL for rows written
6 before this migration.
7
8 Revision ID: 0009
9 Revises: 0008
10 Create Date: 2026-05-04 00:00:00.000000+00:00
11 """
12 from __future__ import annotations
13
14 from typing import Sequence, Union
15
16 import sqlalchemy as sa
17 from alembic import op
18
19 revision: str = "0009"
20 down_revision: Union[str, None] = "0008"
21 branch_labels: Union[str, Sequence[str], None] = None
22 depends_on: Union[str, Sequence[str], None] = None
23
24
25 def upgrade() -> None:
26 op.add_column(
27 "musehub_intel_stable",
28 sa.Column("symbol_kind", sa.String(64), nullable=True),
29 )
30
31
32 def downgrade() -> None:
33 op.drop_column("musehub_intel_stable", "symbol_kind")
File History 1 commit
sha256:6ad6d62107bbd6940c52d63327966b8a65c6391f4a3da6cd9e7548ba4b38bc48 feat(musehub#129): OG repo preview cards — endpoint, cache,… Human minor 16 days ago