Closed LukeBrandon closed 1 year ago
updated_at
db::message::update_message
now()
cargo sqlx prepare
fluke=# select * from message; id | message | created_at | user_id | channel_id | updated_at ----+---------------+-------------------------------+---------+------------+------------------------------- 3 | test messaage | 2023-08-14 18:47:21.342491-05 | 1 | 3 | 2023-08-14 18:47:21.342491-05 (1 row)
fluke=# select * from message; id | message | created_at | user_id | channel_id | updated_at ----+-----------------+-------------------------------+---------+------------+------------------------------- 3 | update messaage | 2023-08-14 18:47:21.342491-05 | 1 | 3 | 2023-08-14 18:48:06.567496-05 (1 row)
Description of changes
updated_at
field for message table (up and down migration)db::message::update_message
to putnow()
into theupdated_at
fieldcargo sqlx prepare
Testing Strategy:
updated_at
time was updatedfluke=# select * from message; id | message | created_at | user_id | channel_id | updated_at ----+-----------------+-------------------------------+---------+------------+------------------------------- 3 | update messaage | 2023-08-14 18:47:21.342491-05 | 1 | 3 | 2023-08-14 18:48:06.567496-05 (1 row)