Skip to content
Commit a81ff50c authored by Maxim Ivanov's avatar Maxim Ivanov
Browse files

Fix storage update query.

Currently there are 2 unique indexes on the table:
```
"storage_pkey" PRIMARY KEY, btree (collection, read, key, user_id)
"storage_collection_key_user_id_key" UNIQUE CONSTRAINT, btree (collection, key, user_id)
```

Only latter trully constraint uniqueness, because it is a subset
of former. When using ON CONFLICT, most specific index of these two should be used, otherwise if `read` column is updated it might attempt
to insert into table violating unique constraint.
parent 3f1fc4f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment