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
When upsert records with upsert_all method on AR 7.0 above, Paranoia restore any matching deleted record.
The sql from AR 6 returned something like this if we do an upsert from the added test:
INSERT INTO \"employers\" (\"id\",\"name\") VALUES (1, 'new_e1'), (2, 'new_e2') ON CONFLICT (\"id\") DO UPDATE SET \"name\"=excluded.\"name\"
With AR 7, InsertAll includes scope keys automatically, generates sql into something like this:
INSERT INTO \"employers\" (\"id\",\"name\",\"deleted_at\") VALUES (1, 'new_e1', NULL), (2, 'new_e2', NULL) ON CONFLICT (\"id\") DO UPDATE SET \"name\"=excluded.\"name\",\"deleted_at\"=excluded.\"deleted_at\" RETURNING \"id\"
How to reproduce:
use this test, it will fail on AR 7.0+
When upsert records with
upsert_all
method on AR 7.0 above, Paranoia restore any matching deleted record.The sql from AR 6 returned something like this if we do an upsert from the added test:
With AR 7, InsertAll includes scope keys automatically, generates sql into something like this:
How to reproduce:
use this test, it will fail on AR 7.0+
The text was updated successfully, but these errors were encountered: