File tree 2 files changed +18
-3
lines changed
2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change
1
+ -- August 26, 2024
2
+ -- Patching 0141 Sample Observation Project Association
3
+ -- to add projects 118 and 160.
4
+
5
+ WITH all_observations AS (
6
+ SELECT observation_id FROM barcodes .sample_observations
7
+ ),
8
+ add_projects AS (
9
+ SELECT project_id
10
+ FROM (VALUES (118 ), (160 )) AS np(project_id)
11
+ WHERE EXISTS (
12
+ SELECT 1 FROM barcodes .project WHERE project .project_id = np .project_id
13
+ )
14
+ )
15
+ INSERT INTO barcodes .sample_observation_project_associations (observation_id, project_id)
16
+ SELECT observation_id, project_id
17
+ FROM all_observations
18
+ CROSS JOIN add_projects;
Original file line number Diff line number Diff line change @@ -409,9 +409,6 @@ def _rows_to_dicts_list(rows):
409
409
LEFT JOIN
410
410
barcodes.sample_observations so
411
411
ON bso.observation_id = so.observation_id
412
- LEFT JOIN
413
- barcodes.sample_observation_project_associations sopa
414
- ON so.observation_id = sopa.observation_id
415
412
WHERE
416
413
bs.barcode = %s
417
414
GROUP BY
You can’t perform that action at this time.
0 commit comments