Check timestamps are defined?
- Dominant language
- Elixir
- Stars
- 15
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
alog is checking that the schemas of the application have the minimum fields defined to allow the package to work:
https://github.com/dwyl/alog/blob/4cbf9d7f3399a665a9b59c5ed0cb96a0e27afc59/lib/alog.ex#L68
https://github.com/dwyl/alog/blob/4cbf9d7f3399a665a9b59c5ed0cb96a0e27afc59/lib/alog.ex#L79
However it doesn't check that timestamps are defined.
timestamps are used in the queries to make sure to retrieve the correct item:
https://github.com/dwyl/alog/blob/4cbf9d7f3399a665a9b59c5ed0cb96a0e27afc59/lib/alog.ex#L106-L114
Do we need to add a check for `inserted_at` and `updated_at` and if yes do we want to check that the type of these value is `naive_datetime_usec` to make sure that microseconds are saved in Postgres?
see https://hexdocs.pm/ecto/Ecto.Schema.html#module-the-datetime-types
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.