You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test if insert_all / upsert_all apply correct values
If Rails give the database multiple values that would conflict in their identifiers (be it unique indexes or primary keys), the database has to decide which ones to apply.
For `insert_all`, this will be the first one (since on conflict, the second entry will be skipped). For `upsert_all`, this is the last one (since on each duplicate, the values get updated). This commit adds two tests to verify that.
The `upsert_all` test has be skipped on PostgreSQL, as upserting with duplicate identifiers is not supported. For more details, see rails#35531.
0 commit comments