Improves add_timestamps_with_timezone helper
What does this MR do?
This improves the add_timestamps_with_timezone
migration helper method, by making the columns configurable. It also improves the tests, and adds a down
helper for timezone columns.
Currently, in the interests of conservatism, the set of valid timezone columns is treated as a closed set of {:created_at, :updated_at, :deleted_at}
. One could imagine that set being extended, or being more liberal by accepting all column names that match a regular expression. That is left for future discussion.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
This does not pose any new performance risks.
New tests have been added to cover the new functionality, and test for expected error cases.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Mayra Cabrera