diff --git a/cmd/signaldctl/cmd/db/migrate.go b/cmd/signaldctl/cmd/db/migrate.go index 122e499..86858e9 100644 --- a/cmd/signaldctl/cmd/db/migrate.go +++ b/cmd/signaldctl/cmd/db/migrate.go @@ -614,7 +614,9 @@ func moveGroupCredentials(source *sql.DB, dest *sql.DB) error { } func moveContacts(source *sql.DB, dest *sql.DB) error { - rows, err := source.Query("SELECT account_uuid, recipient, name, color, profile_key, message_expiration_time, inbox_position FROM contacts") + rows, err := source.Query("SELECT account_uuid, recipient, name, color, profile_key, message_expiration_time, inbox_position FROM contacts" + + " WHERE account_uuid IN (SELECT DISTINCT uuid FROM accounts)", + ) if err != nil { return err }