diff --git a/crates/torii/core/src/sql.rs b/crates/torii/core/src/sql.rs index d7a692c728..2f972c7c43 100644 --- a/crates/torii/core/src/sql.rs +++ b/crates/torii/core/src/sql.rs @@ -169,8 +169,8 @@ impl Sql { let keys_str = felts_sql_string(&keys); let insert_entities = "INSERT INTO entities (id, keys, event_id, executed_at) VALUES (?, \ ?, ?, ?) ON CONFLICT(id) DO UPDATE SET \ - executed_at=EXCLUDED.executed_at, event_id=EXCLUDED.event_id \ - RETURNING *"; + updated_at=CURRENT_TIMESTAMP, executed_at=EXCLUDED.executed_at, \ + event_id=EXCLUDED.event_id RETURNING *"; let mut entity_updated: EntityUpdated = sqlx::query_as(insert_entities) .bind(&entity_id) .bind(&keys_str)