Skip to content

Commit

Permalink
Merge branch 'dev' into refactor-toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
anissa-agahchen authored Sep 21, 2021
2 parents 8a1fa64 + 8916dd4 commit 9ed6609
Show file tree
Hide file tree
Showing 55 changed files with 361 additions and 207 deletions.
7 changes: 3 additions & 4 deletions containers/backup/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /

# Load the backup scripts into the container (must be executable).
COPY backup.* /
COPY s3_config.txt /

COPY webhook-template.json /

Expand All @@ -28,9 +29,7 @@ ADD https://github.com/$SOURCE_REPO/go-crond/releases/download/$GOCROND_VERSION/

USER root
RUN yum install -y epel-release
RUN yum install -y python-pip
RUN pip install s3cmd

RUN yum -y install s3cmd

RUN chmod +x /usr/bin/go-crond
# ========================================================================================================
Expand All @@ -45,4 +44,4 @@ RUN echo $TZ > /etc/timezone
USER 26

# Set the default CMD.
CMD sh envsubst < s3_config.txt > ~/s3_config.txt && sh /backup.sh
CMD sh envsubst < /s3_config.txt > ~/.s3cfg && sh /backup.sh
6 changes: 1 addition & 5 deletions database/src/migrations/20210225205948_biohub_release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path';
const DB_USER_API_PASS = process.env.DB_USER_API_PASS;
const DB_USER_API = process.env.DB_USER_API;

const DB_RELEASE = 'release.0.26';
const DB_RELEASE = 'release.0.28';

/**
* Apply biohub release changes.
Expand Down Expand Up @@ -95,9 +95,6 @@ export async function up(knex: Knex): Promise<void> {
path.join(__dirname, DB_RELEASE, 'populate_common_survey_methodology.sql')
);
const populate_template = fs.readFileSync(path.join(__dirname, DB_RELEASE, 'populate_template.sql'));
const populate_summary_parameter_method_code = fs.readFileSync(
path.join(__dirname, DB_RELEASE, 'populate_summary_parameter_method_code.sql')
);
const populate_summary_parameter_code = fs.readFileSync(
path.join(__dirname, DB_RELEASE, 'populate_summary_parameter_code.sql')
);
Expand Down Expand Up @@ -188,7 +185,6 @@ export async function up(knex: Knex): Promise<void> {
${populate_system_metadata_constant}
${populate_common_survey_methodology}
${populate_template}
${populate_summary_parameter_method_code}
${populate_summary_parameter_code}
-- temporary external interface tables
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ declare
delete from project_funding_source where project_id = p_project_id;
delete from project_iucn_action_classification where project_id = p_project_id;
delete from project_attachment where project_id = p_project_id;
delete from author where project_report_attachment_id in (select project_report_attachment_id from project_report_attachment where project_id = p_project_id);
delete from project_report_attachment where project_id = p_project_id;
delete from project_first_nation where project_id = p_project_id;
delete from project_participation where project_id = p_project_id;
delete from project where project_id = p_project_id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ $$
-- 2021-06-18 initial release
-- [email protected]
-- 2021-06-21 added occurrence submission delete
-- [email protected]
-- 2021-09-21 added survey summary submission delete
-- *******************************************************************
declare
_occurrence_submission_id occurrence_submission.occurrence_submission_id%type;
Expand All @@ -25,8 +27,8 @@ begin
call api_delete_occurrence_submission(_occurrence_submission_id);
end loop;

delete from survey_summary_detail where survey_summary_general_id in (select survey_summary_general_id from survey_summary_general where survey_id = p_survey_id);
delete from survey_summary_general where survey_id = p_survey_id;
delete from survey_summary_detail where survey_summary_submission_id in (select survey_summary_submission_id from survey_summary_submission where survey_id = p_survey_id);
delete from survey_summary_submission where survey_id = p_survey_id;
delete from survey_proprietor where survey_id = p_survey_id;
delete from survey_attachment where survey_id = p_survey_id;
delete from study_species where survey_id = p_survey_id;
Expand Down
Loading

0 comments on commit 9ed6609

Please sign in to comment.