Skip to content

Conversation

@islean
Copy link
Member

@islean islean commented Nov 19, 2025

Description

The Sample.reads column is currently an optional column, with two cancelled samples being the only one with an actual null value. This PR applies an alembic migration to set these two samples to have 0 reads and make the column not nullable

Added

Changed

Fixed

  • Reads is non-nullable
  • Samples with null reads are set to 0.

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b [THIS-BRANCH-NAME] -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@islean
Copy link
Member Author

islean commented Nov 21, 2025

Tested the migration:

(cg_11) isakohlsson@isakoambp cg % alembic -c alembic/alembic.stage.ini upgrade 0ef55d6f0e0f
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 3874118753ff -> 0ef55d6f0e0f, Make sample reads non-nullable
image

Downgrade successful:

(cg_11) isakohlsson@isakoambp cg % alembic -c alembic/alembic.stage.ini downgrade 3874118753ff
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running downgrade 0ef55d6f0e0f -> 3874118753ff, Make sample reads non-nullable
(cg_11) isakohlsson@isakoambp cg % 
image

@islean islean marked this pull request as ready for review November 21, 2025 14:20
@islean islean requested a review from a team as a code owner November 21, 2025 14:20
Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants