[データベース]詳細閲覧時にデータの更新日が更新される不具合を修正しました #2207
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
データベースの詳細画面を閲覧した際に、意図せず最終更新日が現在の日時で上書きされてしまう不具合を修正しました。
変更の目的
「更新日型」として設定された項目が、データの詳細を閲覧するだけで毎回更新されてしまう問題を解決するため。本来、この項目はデータが実際に編集された際にのみ更新されるべきです。
変更内容
証跡用の更新日(
updated_at
)と、画面表示用の最終更新日を分離することで対応しました。databases_inputs
テーブルに、最終更新日を管理するためのlast_col_updated_at
カラムを追加しました。last_col_updated_at
を更新するようにしました。updated_at
から新設したlast_col_updated_at
に変更しました。テスト
以下の手順で、修正が正しく反映されていることを画面上で確認しました。
特記事項
レビュー完了希望日
関連Pull requests/Issues
参考
DB変更の有無
有り
チェックリスト