diff --git a/scripts/seed-database/write/flows.sql b/scripts/seed-database/write/flows.sql index 84d82bbe45..e6f431f5ca 100644 --- a/scripts/seed-database/write/flows.sql +++ b/scripts/seed-database/write/flows.sql @@ -34,7 +34,7 @@ SELECT settings, copied_from FROM sync_flows -ON CONFLICT (id) DO NOTHING; +ON CONFLICT (id) DO UPDATE; -- ensure that original flows.version is overwritten to match new operation inserted below, else sharedb will fail UPDATE flows SET version = 1; diff --git a/scripts/seed-database/write/published_flows.sql b/scripts/seed-database/write/published_flows.sql index ecc6de503b..2cf9d0a48c 100644 --- a/scripts/seed-database/write/published_flows.sql +++ b/scripts/seed-database/write/published_flows.sql @@ -25,4 +25,4 @@ SELECT publisher_id, created_at FROM sync_published_flows -ON CONFLICT (id) DO NOTHING; +ON CONFLICT (id) DO UPDATE; diff --git a/scripts/seed-database/write/team_members.sql b/scripts/seed-database/write/team_members.sql index 1e9d2de0bc..6f1a2dfeb1 100644 --- a/scripts/seed-database/write/team_members.sql +++ b/scripts/seed-database/write/team_members.sql @@ -12,4 +12,4 @@ INSERT INTO SELECT id, user_id, team_id, role FROM - sync_team_members ON CONFLICT (id) DO NOTHING; \ No newline at end of file + sync_team_members ON CONFLICT (id) DO UPDATE; \ No newline at end of file diff --git a/scripts/seed-database/write/teams.sql b/scripts/seed-database/write/teams.sql index 996e630f5e..a798aaff8f 100644 --- a/scripts/seed-database/write/teams.sql +++ b/scripts/seed-database/write/teams.sql @@ -33,6 +33,6 @@ SELECT notify_personalisation, boundary FROM sync_teams -ON CONFLICT (id) DO NOTHING; +ON CONFLICT (id) DO UPDATE; SELECT setval('teams_id_seq', max(id)) FROM teams; diff --git a/scripts/seed-database/write/users.sql b/scripts/seed-database/write/users.sql index adcd172074..ee4444ae94 100644 --- a/scripts/seed-database/write/users.sql +++ b/scripts/seed-database/write/users.sql @@ -30,7 +30,7 @@ SELECT email, is_platform_admin FROM sync_users -ON CONFLICT (id) DO NOTHING; +ON CONFLICT (id) DO UPDATE; ALTER TABLE users ENABLE TRIGGER grant_new_user_template_team_access;