0032_symbol_vitals_coupling_count.py
python
sha256:94ef169c149a452bff7c604ded8b280b19bd477c2dabcb56972780b0b784c7aa
Merge 'fix/assignee-sigil-inline' into 'dev' — proposal: As…
Human
1 day ago
| 1 | """Add coupling_count to musehub_symbol_vitals. |
| 2 | |
| 3 | Pre-computed at push time: the number of distinct symbols this symbol |
| 4 | co-changes with. Enables the symbol list page to show a coupling score |
| 5 | per row without any aggregation at request time. |
| 6 | |
| 7 | Revision ID: 0032 |
| 8 | Revises: 0031 |
| 9 | """ |
| 10 | from __future__ import annotations |
| 11 | |
| 12 | from alembic import op |
| 13 | import sqlalchemy as sa |
| 14 | |
| 15 | revision = "0032" |
| 16 | down_revision = "0031" |
| 17 | branch_labels = None |
| 18 | depends_on = None |
| 19 | |
| 20 | |
| 21 | def upgrade() -> None: |
| 22 | op.add_column( |
| 23 | "musehub_symbol_vitals", |
| 24 | sa.Column("coupling_count", sa.Integer, nullable=False, server_default="0"), |
| 25 | ) |
| 26 | |
| 27 | |
| 28 | def downgrade() -> None: |
| 29 | from sqlalchemy import text |
| 30 | op.execute(text("ALTER TABLE IF EXISTS musehub_symbol_vitals DROP COLUMN IF EXISTS coupling_count")) |
File History
3 commits
sha256:94ef169c149a452bff7c604ded8b280b19bd477c2dabcb56972780b0b784c7aa
Merge 'fix/assignee-sigil-inline' into 'dev' — proposal: As…
Human
1 day ago
sha256:6b1949fc2797ca4c1936a637a4cbfec828ef56cf52398a2e74ca3c4f494e728f
fix: use wire_bytes not mpack_bytes_raw in compute_object_b…
Sonnet 4.6
patch
9 days ago
sha256:4aed3d8601c8dd3ed37074de35f11f4a9699a0a4b99d43727048fd3f8e6fd13d
chore: doc sweep, ignore wrangler build state, misc fixes
Sonnet 4.6
minor
⚠
12 days ago