gabriel / musehub public
0014_languages_kinds_json.py python
39 lines 984 B
Raw
sha256:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8 docs: add production launch discovery report and infra laun… Sonnet 5 8 days ago
1 """languages: add kinds_json column to musehub_intel_languages
2
3 Stores the per-language symbol-kind breakdown (e.g. {'function': 1346,
4 'class': 1447}) produced by LanguagesProvider on every push. Previously
5 this data was discarded; now it drives the kind-chip row on the languages
6 intel page.
7
8 Revision ID: 0014
9 Revises: 0013
10 """
11
12 from __future__ import annotations
13
14 from typing import Union
15
16 import sqlalchemy as sa
17 from alembic import op
18 from sqlalchemy.dialects import postgresql
19
20 revision: str = "0014"
21 down_revision: Union[str, None] = "0013"
22 branch_labels = None
23 depends_on = None
24
25
26 def upgrade() -> None:
27 op.add_column(
28 "musehub_intel_languages",
29 sa.Column(
30 "kinds_json",
31 postgresql.JSONB(astext_type=sa.Text()),
32 nullable=True,
33 comment="kind → count breakdown, e.g. {'function': 1346, 'class': 1447}",
34 ),
35 )
36
37
38 def downgrade() -> None:
39 op.drop_column("musehub_intel_languages", "kinds_json")
File History 2 commits
sha256:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8 docs: add production launch discovery report and infra laun… Sonnet 5 8 days ago
sha256:eb0928124669c933c0ef852bea1ad0c56649cf21bd7e9663c3b51004771b0591 docs: add MuseHub cloud identity/AWS operating model and Go… Sonnet 5 patch 9 days ago