diff --git a/scripts/seed-database/container.sh b/scripts/seed-database/container.sh index b7327d453e..227d7e3fe7 100755 --- a/scripts/seed-database/container.sh +++ b/scripts/seed-database/container.sh @@ -35,7 +35,7 @@ done # Copy subset of team_integrations columns # Do not copy production values -psql --quiet ${REMOTE_PG} --command="\\copy (SELECT id, team_id, staging_bops_submission_url FROM team_integrations) TO '/tmp/team_integrations.csv' (FORMAT csv, DELIMITER ';');" +psql --quiet ${REMOTE_PG} --command="\\copy (SELECT id, team_id, staging_bops_submission_url, staging_bops_secret FROM team_integrations) TO '/tmp/team_integrations.csv' (FORMAT csv, DELIMITER ';');" echo team_integrations downloaded psql --quiet ${REMOTE_PG} --command="\\copy (SELECT DISTINCT ON (flow_id) id, data, flow_id, summary, publisher_id, created_at FROM published_flows ORDER BY flow_id, created_at DESC) TO '/tmp/published_flows.csv' (FORMAT csv, DELIMITER ';');" diff --git a/scripts/seed-database/write/team_integrations.sql b/scripts/seed-database/write/team_integrations.sql index ec4d790655..433d35b86b 100644 --- a/scripts/seed-database/write/team_integrations.sql +++ b/scripts/seed-database/write/team_integrations.sql @@ -2,20 +2,23 @@ CREATE TEMPORARY TABLE sync_team_integrations ( id serial, team_id integer, - staging_bops_submission_url text + staging_bops_submission_url text, + staging_bops_secret text ); \COPY sync_team_integrations FROM '/tmp/team_integrations.csv' WITH (FORMAT csv, DELIMITER ';'); INSERT INTO - team_integrations (id, team_id, staging_bops_submission_url) + team_integrations (id, team_id, staging_bops_submission_url, staging_bops_secret) SELECT id, team_id, - staging_bops_submission_url + staging_bops_submission_url, + staging_bops_secret FROM sync_team_integrations ON CONFLICT (id) DO UPDATE SET team_id = EXCLUDED.team_id, - staging_bops_submission_url = EXCLUDED.staging_bops_submission_url; \ No newline at end of file + staging_bops_submission_url = EXCLUDED.staging_bops_submission_url, + staging_bops_secret = EXCLUDED.staging_bops_secret; \ No newline at end of file