diff --git a/alembic/versions/20260526_091726_0c555bea9437_add_em_dense_reconstruction_dataset_.py b/alembic/versions/20260526_091726_0c555bea9437_add_em_dense_reconstruction_dataset_.py new file mode 100644 index 00000000..e2161e50 --- /dev/null +++ b/alembic/versions/20260526_091726_0c555bea9437_add_em_dense_reconstruction_dataset_.py @@ -0,0 +1,67 @@ +"""Add em_dense_reconstruction_dataset_cell_morphology derivation + +Revision ID: 0c555bea9437 +Revises: 1df0fd1302f9 +Create Date: 2026-05-26 09:17:26.248765 + +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa +from alembic_postgresql_enum import TableReference + +from sqlalchemy import Text +import app.db.types + +# revision identifiers, used by Alembic. +revision: str = "0c555bea9437" +down_revision: Union[str, None] = "1df0fd1302f9" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.sync_enum_values( + enum_schema="public", + enum_name="derivationtype", + new_values=[ + "circuit_customization", + "circuit_extraction", + "circuit_rewiring", + "emodel_circuit", + "em_dense_reconstruction_dataset_cell_morphology", + "unspecified", + ], + affected_columns=[ + TableReference( + table_schema="public", table_name="derivation", column_name="derivation_type" + ) + ], + enum_values_to_rename=[], + ) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.sync_enum_values( + enum_schema="public", + enum_name="derivationtype", + new_values=[ + "circuit_customization", + "circuit_extraction", + "circuit_rewiring", + "emodel_circuit", + "unspecified", + ], + affected_columns=[ + TableReference( + table_schema="public", table_name="derivation", column_name="derivation_type" + ) + ], + enum_values_to_rename=[], + ) + # ### end Alembic commands ### diff --git a/app/db/types.py b/app/db/types.py index b1aca1f5..cd801202 100644 --- a/app/db/types.py +++ b/app/db/types.py @@ -271,6 +271,7 @@ class DerivationType(StrEnum): circuit_extraction = auto() circuit_rewiring = auto() emodel_circuit = auto() + em_dense_reconstruction_dataset_cell_morphology = auto() unspecified = auto() diff --git a/scripts/export/build_database_archive.sh b/scripts/export/build_database_archive.sh index d7394e48..5d84cc76 100755 --- a/scripts/export/build_database_archive.sh +++ b/scripts/export/build_database_archive.sh @@ -2,7 +2,7 @@ # Automatically generated, do not edit! set -euo pipefail SCRIPT_VERSION="1" -SCRIPT_DB_VERSION="1df0fd1302f9" +SCRIPT_DB_VERSION="0c555bea9437" echo "DB dump (version $SCRIPT_VERSION for db version $SCRIPT_DB_VERSION)" @@ -271,7 +271,7 @@ install -m 755 /dev/stdin "$WORK_DIR/load.sh" <<'EOF_LOAD_SCRIPT' # Automatically generated, do not edit! set -euo pipefail SCRIPT_VERSION="1" -SCRIPT_DB_VERSION="1df0fd1302f9" +SCRIPT_DB_VERSION="0c555bea9437" echo "DB load (version $SCRIPT_VERSION for db version $SCRIPT_DB_VERSION)"