Skip to content

Commit

Permalink
fix: insert next entry at index 1 or max+1 (#461)
Browse files Browse the repository at this point in the history
insert next at 1 or max+1
  • Loading branch information
philsippl authored Sep 26, 2024
1 parent 408722d commit ac29635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iris-mpc-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ DO UPDATE SET right_code = EXCLUDED.right_code, right_mask = EXCLUDED.right_mask

pub async fn update_iris_id_sequence(&self) -> Result<()> {
sqlx::query(
"SELECT setval(pg_get_serial_sequence('irises', 'id'), COALESCE(MAX(id), 0), false) \
"SELECT setval(pg_get_serial_sequence('irises', 'id'), COALESCE(MAX(id), 0), true) \
FROM irises",
)
.execute(&self.pool)
Expand Down

0 comments on commit ac29635

Please sign in to comment.