Skip to content

Commit b2e9fa9

Browse files
committed
Quality to schema
1 parent 53cb97d commit b2e9fa9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

qiita_db/artifact.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ def unique_ids(self):
18771877

18781878
with qdb.sql_connection.TRN:
18791879
# insert any IDs not present
1880-
sql = """INSERT INTO map_artifact_sample_idx (artifact_idx, prep_sample_idx)
1880+
sql = """INSERT INTO qiita.map_artifact_sample_idx (artifact_idx, prep_sample_idx)
18811881
VALUES (%s, %s)
18821882
ON CONFLICT (artifact_idx, prep_sample_idx)
18831883
DO NOTHING"""
@@ -1887,9 +1887,9 @@ def unique_ids(self):
18871887
sql = """SELECT
18881888
sample_name,
18891889
artifact_sample_idx
1890-
FROM map_artifact_sample_idx
1891-
JOIN map_prep_sample_idx USING (prep_sample_idx)
1892-
JOIN map_sample_idx USING (sample_idx)
1890+
FROM qiita.map_artifact_sample_idx
1891+
JOIN qiita.map_prep_sample_idx USING (prep_sample_idx)
1892+
JOIN qiita.map_sample_idx USING (sample_idx)
18931893
WHERE artifact_idx=%s
18941894
"""
18951895
qdb.sql_connection.TRN.add(sql, [self._id, ])

qiita_db/metadata_template/prep_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def unique_ids(self):
363363

364364
with qdb.sql_connection.TRN:
365365
# insert any IDs not present
366-
sql = """INSERT INTO map_prep_sample_idx (prep_idx, sample_idx)
366+
sql = """INSERT INTO qiita.map_prep_sample_idx (prep_idx, sample_idx)
367367
VALUES (%s, %s)
368368
ON CONFLICT (prep_idx, sample_idx)
369369
DO NOTHING"""
@@ -373,8 +373,8 @@ def unique_ids(self):
373373
sql = """SELECT
374374
sample_name,
375375
prep_sample_idx
376-
FROM map_prep_sample_idx
377-
JOIN map_sample_idx USING (sample_idx)
376+
FROM qiita.map_prep_sample_idx
377+
JOIN qiita.map_sample_idx USING (sample_idx)
378378
WHERE prep_idx=%s
379379
"""
380380
qdb.sql_connection.TRN.add(sql, [self._id, ])

qiita_db/metadata_template/sample_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def unique_ids(self):
192192
samples = [[self._id, s_id] for s_id in sorted(self.keys())]
193193
with qdb.sql_connection.TRN:
194194
# insert any IDs not present
195-
sql = """INSERT INTO map_sample_idx (study_idx, sample_name)
195+
sql = """INSERT INTO qiita.map_sample_idx (study_idx, sample_name)
196196
VALUES (%s, %s)
197197
ON CONFLICT (sample_name)
198198
DO NOTHING"""
@@ -202,7 +202,7 @@ def unique_ids(self):
202202
sql = """SELECT
203203
sample_name,
204204
sample_idx
205-
FROM map_sample_idx
205+
FROM qiita.map_sample_idx
206206
WHERE study_idx=%s
207207
"""
208208
qdb.sql_connection.TRN.add(sql, [self._id, ])

0 commit comments

Comments
 (0)