Skip to content

Commit 8660043

Browse files
authored
qiita.slurm_resource_allocations (#3391)
* Update CHANGELOG.md * add db changes including fix #3368
1 parent 83476d5 commit 8660043

File tree

3 files changed

+231
-29
lines changed

3 files changed

+231
-29
lines changed

qiita_db/support_files/patches/92.sql

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Apr 16, 2024
2+
-- Adding a new table to contain the basic slurm information to minimize
3+
-- the number of times we need to retrieve this information
4+
5+
CREATE TABLE qiita.slurm_resource_allocations (
6+
processing_job_id uuid NOT NULL,
7+
samples integer,
8+
columns integer,
9+
input_size bigint,
10+
extra_info varchar DEFAULT NULL,
11+
memory_used bigint,
12+
walltime_used integer,
13+
CONSTRAINT pk_slurm_resource_allocations_processing_job_id PRIMARY KEY (
14+
processing_job_id )
15+
);
16+
17+
ALTER TABLE qiita.slurm_resource_allocations
18+
ADD CONSTRAINT fk_slurm_resource_allocations
19+
FOREIGN KEY ( processing_job_id )
20+
REFERENCES qiita.processing_job ( processing_job_id );

qiita_db/support_files/qiita-db.dbs

+37-2
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,22 @@
13261326
<column name="sample_id" />
13271327
</index>
13281328
</table>
1329+
<table name="settings" prior="base_work_dir" >
1330+
<column name="test" type="boolean" jt="-7" mandatory="y" >
1331+
<defo><![CDATA[true]]></defo>
1332+
</column>
1333+
<column name="base_data_dir" type="varchar" jt="12" mandatory="y" />
1334+
<column name="base_work_dir" type="varchar" jt="12" mandatory="y" />
1335+
<column name="current_patch" type="varchar" jt="12" mandatory="y" >
1336+
<defo><![CDATA['unpatched'::character varying]]></defo>
1337+
</column>
1338+
<column name="max_preparation_samples" type="integer" jt="4" >
1339+
<defo><![CDATA[800]]></defo>
1340+
</column>
1341+
<column name="max_artifacts_in_workflow" type="integer" jt="4" >
1342+
<defo><![CDATA[35]]></defo>
1343+
</column>
1344+
</table>
13291345
<table name="severity" >
13301346
<column name="severity_id" type="integer" length="10" decimal="0" jt="4" mandatory="y" >
13311347
<defo><![CDATA[nextval('qiita.severity_severity_id_seq'::regclass)]]></defo>
@@ -1338,6 +1354,23 @@
13381354
<column name="severity" />
13391355
</index>
13401356
</table>
1357+
<table name="slurm_resource_allocations" prior="tbl" >
1358+
<column name="processing_job_id" type="uuid" jt="1111" mandatory="y" />
1359+
<column name="samples" type="integer" jt="4" />
1360+
<column name="columns" type="integer" jt="4" />
1361+
<column name="input_size" type="bigint" jt="-5" />
1362+
<column name="extra_info" type="varchar" jt="12" >
1363+
<defo><![CDATA[null]]></defo>
1364+
</column>
1365+
<column name="memory_used" type="bigint" jt="-5" />
1366+
<column name="walltime_used" type="integer" jt="4" />
1367+
<index name="pk_slurm_resource_allocations_processing_job_id" unique="PRIMARY_KEY" >
1368+
<column name="processing_job_id" />
1369+
</index>
1370+
<fk name="fk_slurm_resource_allocations" to_schema="qiita" to_table="processing_job" >
1371+
<fk_column name="processing_job_id" pk="processing_job_id" />
1372+
</fk>
1373+
</table>
13411374
<table name="software" >
13421375
<column name="software_id" type="bigint" length="19" decimal="0" jt="-5" mandatory="y" >
13431376
<defo><![CDATA[nextval('qiita.software_software_id_seq'::regclass)]]></defo>
@@ -2023,14 +2056,14 @@ $function$
20232056
</schema>
20242057
<connector name="PostgreSQL" database="PostgreSQL" driver_class="org.postgresql.Driver" driver_jar="postgresql-42.2.18.jar" driver_desc="Standard" host="localhost" port="5432" instance="qiita_test" user="antoniog" />
20252058
<layout name="Qiita DB Schema" id="Layout_1647" show_column_type="y" show_relation="columns" >
2026-
<comment><![CDATA[Qiita DB Schema]]></comment>
2059+
<comment><![CDATA[Qiita DB]]></comment>
20272060
<entity schema="qiita" name="analysis" color="D1BEF4" x="720" y="48" />
20282061
<entity schema="qiita" name="analysis_artifact" color="D1BEF4" x="496" y="48" />
20292062
<entity schema="qiita" name="analysis_filepath" color="F4DDBE" x="1680" y="624" />
20302063
<entity schema="qiita" name="analysis_portal" color="D1BEF4" x="1024" y="64" />
20312064
<entity schema="qiita" name="analysis_processing_job" color="D1BEF4" x="416" y="304" />
20322065
<entity schema="qiita" name="analysis_sample" color="D1BEF4" x="752" y="272" />
2033-
<entity schema="qiita" name="analysis_users" color="D1BEF4" x="304" y="176" />
2066+
<entity schema="qiita" name="analysis_users" color="D1BEF4" x="352" y="176" />
20342067
<entity schema="qiita" name="archive_feature_value" color="D1BEF4" x="1312" y="48" />
20352068
<entity schema="qiita" name="archive_merging_scheme" color="D1BEF4" x="1616" y="48" />
20362069
<entity schema="qiita" name="artifact" color="BED3F4" x="2160" y="576" />
@@ -2091,7 +2124,9 @@ $function$
20912124
<entity schema="qiita" name="restrictions" color="BED3F4" x="2768" y="1424" />
20922125
<entity schema="qiita" name="sample_template_filepath" color="BED3F4" x="2720" y="1296" />
20932126
<entity schema="qiita" name="sample_x" color="BED3F4" x="912" y="1408" />
2127+
<entity schema="qiita" name="settings" color="F82E15" x="64" y="160" />
20942128
<entity schema="qiita" name="severity" color="F4DDBE" x="1632" y="240" />
2129+
<entity schema="qiita" name="slurm_resource_allocations" color="F4DDBE" x="1888" y="640" />
20952130
<entity schema="qiita" name="software" color="F4DDBE" x="3232" y="320" />
20962131
<entity schema="qiita" name="software_artifact_type" color="BEBEF4" x="2128" y="304" />
20972132
<entity schema="qiita" name="software_command" color="F4DDBE" x="2880" y="320" />

0 commit comments

Comments
 (0)