Skip to content

Commit 2646fac

Browse files
mgeplfJean-Denis Courcol
authored andcommitted
Initial implementation of brain-atlas endpoints (#195)
See #168 for the specification. Briefly; a `BrainAtlas` is an named entity that has an asset `annotation.nrrd` attached to it. It is associated with a particular `BrainRegionHierarchy` In addition, `BrainAtlasRegion` gives metadata for all the regions within a `BrainAtlas`; * their volume in the `annotation.nrrd` if they are a leaf, None otherwise. * an attached asset with the .obj mesh
1 parent f170314 commit 2646fac

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

alembic/versions/20250526_124351_a864888b6a39_default_migration_message.py renamed to alembic/versions/20250526_220145_c1693694ffe7_default_migration_message.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Default migration message
22
3-
Revision ID: a864888b6a39
4-
Revises: 9730c55381f3
5-
Create Date: 2025-05-26 12:43:51.408647
3+
Revision ID: c1693694ffe7
4+
Revises: 634224e88212
5+
Create Date: 2025-05-26 22:01:45.625516
66
77
"""
88

@@ -16,8 +16,8 @@
1616
import app.db.types
1717

1818
# revision identifiers, used by Alembic.
19-
revision: str = "a864888b6a39"
20-
down_revision: Union[str, None] = "9730c55381f3"
19+
revision: str = "c1693694ffe7"
20+
down_revision: Union[str, None] = "634224e88212"
2121
branch_labels: Union[str, Sequence[str], None] = None
2222
depends_on: Union[str, Sequence[str], None] = None
2323

@@ -47,14 +47,15 @@ def upgrade() -> None:
4747
["calibrated_entity_id"],
4848
unique=False,
4949
)
50-
op.drop_column("memodel", "holding_current")
5150
op.drop_column("memodel", "threshold_current")
51+
op.drop_column("memodel", "holding_current")
5252
op.sync_enum_values(
5353
enum_schema="public",
5454
enum_name="entitytype",
5555
new_values=[
5656
"analysis_software_source_code",
5757
"brain_atlas",
58+
"brain_atlas_region",
5859
"emodel",
5960
"cell_composition",
6061
"memodel_calibration_result",
@@ -90,6 +91,7 @@ def downgrade() -> None:
9091
new_values=[
9192
"analysis_software_source_code",
9293
"brain_atlas",
94+
"brain_atlas_region",
9395
"emodel",
9496
"cell_composition",
9597
"experimental_bouton_density",
@@ -116,16 +118,16 @@ def downgrade() -> None:
116118
op.add_column(
117119
"memodel",
118120
sa.Column(
119-
"threshold_current",
120-
sa.DOUBLE_PRECISION(precision=53),
121-
autoincrement=False,
122-
nullable=True,
121+
"holding_current", sa.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True
123122
),
124123
)
125124
op.add_column(
126125
"memodel",
127126
sa.Column(
128-
"holding_current", sa.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=True
127+
"threshold_current",
128+
sa.DOUBLE_PRECISION(precision=53),
129+
autoincrement=False,
130+
nullable=True,
129131
),
130132
)
131133
op.drop_index(

0 commit comments

Comments
 (0)