nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints#

Add check constraints to session_log.

Adds CHECK constraints to session_log table for event_type and record_status.

This migration:

  1. Adds CHECK constraint for event_type enum values

  2. Adds CHECK constraint for record_status enum values (including BUILT_NOT_EXPORTED)

For SQLite, this requires recreating the table since ALTER TABLE doesn’t support adding CHECK constraints.

Revision ID: v2_4_0b Revises: v2_4_0a Create Date: 2026-01-25 10:28:38.768026

Module Contents#

Functions#

upgrade

Upgrade schema.

downgrade

Downgrade schema.

Data#

API#

nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints.revision#

‘v2_4_0b’

Type: str

nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints.down_revision#

‘v2_4_0a’

Type: typing.Union[str, typing.Sequence[str], None]

nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints.branch_labels#

Type: typing.Union[str, typing.Sequence[str], None]

nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints.depends_on#

Type: typing.Union[str, typing.Sequence[str], None]

nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints.upgrade() None[source]#

Upgrade schema.

nexusLIMS.db.migrations.versions.v2_4_0b_add_check_constraints.downgrade() None[source]#

Downgrade schema.