diff --git a/scripts/seed-database/write/team_integrations.sql b/scripts/seed-database/write/team_integrations.sql index a8c6f11754..44a433e756 100644 --- a/scripts/seed-database/write/team_integrations.sql +++ b/scripts/seed-database/write/team_integrations.sql @@ -3,25 +3,28 @@ CREATE TEMPORARY TABLE sync_team_integrations ( id serial, team_id integer, staging_bops_submission_url text, - staging_bops_secret text + staging_bops_secret text, + has_planning_data boolean ); \COPY sync_team_integrations FROM '/tmp/team_integrations.csv' WITH (FORMAT csv, DELIMITER ';'); INSERT INTO - team_integrations (id, team_id, staging_bops_submission_url, staging_bops_secret) + team_integrations (id, team_id, staging_bops_submission_url, staging_bops_secret, has_planning_data) SELECT id, team_id, staging_bops_submission_url, - staging_bops_secret + staging_bops_secret, + has_planning_data FROM sync_team_integrations ON CONFLICT (id) DO UPDATE SET team_id = EXCLUDED.team_id, staging_bops_submission_url = EXCLUDED.staging_bops_submission_url, - staging_bops_secret = EXCLUDED.staging_bops_secret; + staging_bops_secret = EXCLUDED.staging_bops_secret, + has_planning_data = EXCLUDED.has_planning_data; SELECT setval('team_integrations_id_seq', max(id)) FROM