Skip to content

Commit 97f2886

Browse files
authored
Extend service subtypes with single cell build operations (#10)
1 parent 1c7f46f commit 97f2886

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"""empty message
2+
3+
Revision ID: a4cab64aa586
4+
Revises: b974ebded6ab
5+
Create Date: 2025-02-19 15:49:31.212536
6+
7+
"""
8+
9+
from collections.abc import Sequence
10+
11+
from alembic_postgresql_enum import TableReference
12+
13+
from alembic import op
14+
15+
# revision identifiers, used by Alembic.
16+
revision: str = "a4cab64aa586"
17+
down_revision: str | None = "b974ebded6ab"
18+
branch_labels: str | Sequence[str] | None = None
19+
depends_on: str | Sequence[str] | None = None
20+
21+
22+
def upgrade() -> None:
23+
# ### commands auto generated by Alembic - please adjust! ###
24+
op.sync_enum_values(
25+
"public",
26+
"servicesubtype",
27+
[
28+
"STORAGE",
29+
"SINGLE_CELL_SIM",
30+
"SINGLE_CELL_BUILD",
31+
"SYNAPTOME_SIM",
32+
"SYNAPTOME_BUILD",
33+
"ML_RETRIEVAL",
34+
"ML_LLM",
35+
"ML_RAG",
36+
],
37+
[
38+
TableReference(table_schema="public", table_name="job", column_name="service_subtype"),
39+
TableReference(
40+
table_schema="public", table_name="price", column_name="service_subtype"
41+
),
42+
],
43+
enum_values_to_rename=[],
44+
)
45+
# ### end Alembic commands ###
46+
47+
48+
def downgrade() -> None:
49+
# ### commands auto generated by Alembic - please adjust! ###
50+
op.sync_enum_values(
51+
"public",
52+
"servicesubtype",
53+
["STORAGE", "SINGLE_CELL_SIM", "SYNAPTOME_SIM", "ML_RETRIEVAL", "ML_LLM", "ML_RAG"],
54+
[
55+
TableReference(table_schema="public", table_name="job", column_name="service_subtype"),
56+
TableReference(
57+
table_schema="public", table_name="price", column_name="service_subtype"
58+
),
59+
],
60+
enum_values_to_rename=[],
61+
)
62+
# ### end Alembic commands ###

app/constants.py

+2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ class ServiceSubtype(HyphenStrEnum):
6161

6262
STORAGE = auto()
6363
SINGLE_CELL_SIM = auto()
64+
SINGLE_CELL_BUILD = auto()
6465
SYNAPTOME_SIM = auto()
66+
SYNAPTOME_BUILD = auto()
6567
ML_RETRIEVAL = auto()
6668
ML_LLM = auto()
6769
ML_RAG = auto()

0 commit comments

Comments
 (0)