Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename last params to seurat_object
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Pickering <alexvpickering@gmail.com>
alexvpickering committed Sep 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent b598279 commit b23ffae
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/sql/migrations/20240918171424_rename_last_params_seurat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = async (knex) => {
// Update the last_pipeline_params to set sampleTechnology to seurat_object where it is currently seurat
await knex('experiment_execution')
.where({ pipeline_type: 'obj2s' })
.update({
last_pipeline_params: knex.raw("jsonb_set(last_pipeline_params::jsonb, '{sampleTechnology}', '\"seurat_object\"'::jsonb)"),
});
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = async (knex) => {
// Revert sampleTechnology back to seurat
await knex('experiment_execution')
.where({ pipeline_type: 'obj2s' })
.update({
last_pipeline_params: knex.raw("jsonb_set(last_pipeline_params::jsonb, '{sampleTechnology}', '\"seurat\"'::jsonb)"),
});
};

0 comments on commit b23ffae

Please sign in to comment.