Skip to content

Clean db files add human reads filter method #3421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean db files + add human_reads_filter_method
  • Loading branch information
antgonza committed Jun 28, 2024
commit 7d42b8418d78cb665afc550194b75aafaee85f18
25 changes: 25 additions & 0 deletions qiita_db/support_files/patches/92.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,28 @@ ALTER TABLE qiita.qiita_user
ADD creation_timestamp timestamp without time zone DEFAULT NOW();

COMMENT ON COLUMN qiita.qiita_user.creation_timestamp IS 'The date the user account was created';

-- Jun 28, 2024
-- These columns were added by mistake to qiita-db-unpatched.sql in PR:
-- https://github.com/qiita-spots/qiita/pull/3412 so adding here now

ALTER TABLE qiita.qiita_user ADD social_orcid character varying DEFAULT NULL;
ALTER TABLE qiita.qiita_user ADD social_researchgate character varying DEFAULT NULL;
ALTER TABLE qiita.qiita_user ADD social_googlescholar character varying DEFAULT NULL;

-- Add human_reads_filter_method so we can keep track of the available methods
-- and link them to the preparations

CREATE TABLE qiita.human_reads_filter_method (
human_reads_filter_method_id bigint NOT NULL,
human_reads_filter_method_method character varying NOT NULL;
CONSTRAINT pk_human_reads_filter_method_id PRIMARY KEY (
human_reads_filter_method_id )
);

ALTER TABLE qiita.prep_template
ADD human_reads_filter_method_id bigint DEFAULT NULL;
ALTER TABLE qiita.prep_template
ADD CONSTRAINT fk_human_reads_filter_method
FOREIGN KEY ( human_reads_filter_method_id )
REFERENCES qiita.human_reads_filter_method ( human_reads_filter_method_id );
5 changes: 1 addition & 4 deletions qiita_db/support_files/qiita-db-unpatched.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1888,10 +1888,7 @@ CREATE TABLE qiita.qiita_user (
user_verify_code character varying,
pass_reset_code character varying,
pass_reset_timestamp timestamp without time zone,
receive_processing_job_emails boolean DEFAULT false,
social_orcid character varying DEFAULT NULL,
social_researchgate character varying DEFAULT NULL,
social_googlescholar character varying DEFAULT NULL
receive_processing_job_emails boolean DEFAULT false
);


Expand Down
35 changes: 33 additions & 2 deletions qiita_db/support_files/qiita-db.dbs
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,13 @@
<column name="filepath_type" />
</index>
</table>
<table name="human_reads_filter_method" prior="human_reads_filter" >
<column name="human_reads_filter_method_id" type="bigint" jt="-5" mandatory="y" />
<column name="human_reads_filter_method_name" type="varchar" jt="12" mandatory="y" />
<index name="pk_human_reads_filter_method_human_reads_filter_method_id" unique="PRIMARY_KEY" >
<column name="human_reads_filter_method_id" />
</index>
</table>
<table name="investigation" >
<comment><![CDATA[Overarching investigation information.An investigation comprises one or more individual studies.]]></comment>
<column name="investigation_id" type="bigint" length="19" decimal="0" jt="-5" mandatory="y" >
Expand Down Expand Up @@ -1007,6 +1014,9 @@
<column name="reprocess_job_id" type="uuid" jt="1111" >
<defo><![CDATA[NULL]]></defo>
</column>
<column name="human_reads_filter_method_id" type="bigint" jt="-5" >
<defo><![CDATA[NULL]]></defo>
</column>
<index name="pk_prep_template" unique="PRIMARY_KEY" >
<column name="prep_template_id" />
</index>
Expand Down Expand Up @@ -1265,6 +1275,19 @@
<column name="receive_processing_job_emails" type="boolean" jt="-7" mandatory="y" >
<defo><![CDATA[false]]></defo>
</column>
<column name="social_orcid" type="varchar" jt="12" >
<defo><![CDATA[NULL]]></defo>
</column>
<column name="social_researchgate" type="varchar" jt="12" >
<defo><![CDATA[NULL]]></defo>
</column>
<column name="social_googlescholar" type="varchar" jt="12" >
<defo><![CDATA[NULL]]></defo>
</column>
<column name="creation_timestamp" type="timestamp" jt="93" >
<defo><![CDATA[NOW()]]></defo>
<comment><![CDATA[The date the user account was created]]></comment>
</column>
<index name="pk_user" unique="PRIMARY_KEY" >
<column name="email" />
</index>
Expand Down Expand Up @@ -1370,6 +1393,13 @@
</column>
<column name="memory_used" type="bigint" jt="-5" />
<column name="walltime_used" type="integer" jt="4" />
<column name="job_start" type="text" jt="12" />
<column name="node_name" type="varchar" jt="12" >
<defo><![CDATA[NULL]]></defo>
</column>
<column name="node_model" type="varchar" jt="12" >
<defo><![CDATA[NULL]]></defo>
</column>
<index name="pk_slurm_resource_allocations_processing_job_id" unique="PRIMARY_KEY" >
<column name="processing_job_id" />
</index>
Expand Down Expand Up @@ -2098,6 +2128,7 @@ $function$
<entity schema="qiita" name="environmental_package" color="C7F4BE" x="752" y="960" />
<entity schema="qiita" name="filepath" color="BED3F4" x="2944" y="1024" />
<entity schema="qiita" name="filepath_type" color="BED3F4" x="2960" y="1296" />
<entity schema="qiita" name="human_reads_filter_method" color="C1D8EE" x="2304" y="1312" />
<entity schema="qiita" name="investigation" color="C7F4BE" x="704" y="464" />
<entity schema="qiita" name="investigation_study" color="C7F4BE" x="736" y="688" />
<entity schema="qiita" name="logging" color="F4DDBE" x="1760" y="320" />
Expand Down Expand Up @@ -2125,14 +2156,14 @@ $function$
<entity schema="qiita" name="processing_job_workflow" color="F4DDBE" x="1600" y="1168" />
<entity schema="qiita" name="processing_job_workflow_root" color="F4DDBE" x="1600" y="1056" />
<entity schema="qiita" name="publication" color="F4DDBE" x="3232" y="832" />
<entity schema="qiita" name="qiita_user" color="D1BEF4" x="64" y="1232" />
<entity schema="qiita" name="qiita_user" color="D1BEF4" x="48" y="1216" />
<entity schema="qiita" name="reference" color="BED3F4" x="3248" y="1024" />
<entity schema="qiita" name="restrictions" color="BED3F4" x="2768" y="1424" />
<entity schema="qiita" name="sample_template_filepath" color="BED3F4" x="2720" y="1296" />
<entity schema="qiita" name="sample_x" color="BED3F4" x="912" y="1408" />
<entity schema="qiita" name="settings" color="F82E15" x="64" y="160" />
<entity schema="qiita" name="severity" color="F4DDBE" x="1632" y="240" />
<entity schema="qiita" name="slurm_resource_allocations" color="F4DDBE" x="1888" y="640" />
<entity schema="qiita" name="slurm_resource_allocations" color="F4DDBE" x="1888" y="624" />
<entity schema="qiita" name="software" color="F4DDBE" x="3232" y="320" />
<entity schema="qiita" name="software_artifact_type" color="BEBEF4" x="2128" y="304" />
<entity schema="qiita" name="software_command" color="F4DDBE" x="2880" y="320" />
Expand Down
Loading
Loading