gabriel / musehub public
0011_coupling_indexes.py python
34 lines 788 B
Raw
sha256:0521dce9aca20da6ab4d9ebee6de75ab876bd82cddbc6bd4897d1ac6ecd11d3d docs(musehub#129): freeze Phase 1 OG repo card design Human 17 days ago
1 """coupling: add co_changes + file_a indexes to musehub_intel_coupling
2
3 Revision ID: 0011
4 Revises: 0010
5 """
6
7 from __future__ import annotations
8
9 from typing import Union
10
11 from alembic import op
12
13 revision: str = "0011"
14 down_revision: Union[str, None] = "0010"
15 branch_labels = None
16 depends_on = None
17
18
19 def upgrade() -> None:
20 op.create_index(
21 "ix_intel_coupling_repo_co",
22 "musehub_intel_coupling",
23 ["repo_id", "co_changes"],
24 )
25 op.create_index(
26 "ix_intel_coupling_repo_file_a",
27 "musehub_intel_coupling",
28 ["repo_id", "file_a"],
29 )
30
31
32 def downgrade() -> None:
33 op.drop_index("ix_intel_coupling_repo_file_a", table_name="musehub_intel_coupling")
34 op.drop_index("ix_intel_coupling_repo_co", table_name="musehub_intel_coupling")
File History 1 commit
sha256:6ad6d62107bbd6940c52d63327966b8a65c6391f4a3da6cd9e7548ba4b38bc48 feat(musehub#129): OG repo preview cards — endpoint, cache,… Human minor 17 days ago