Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ecto 2.1, by using utc_datetime as default #5

Merged
merged 1 commit into from
Jan 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ The library source code is minimal and tested. It is highly suggested that you c
4. run this command to generate the migration:

```mix papertrail.install```

5. If you do not wish to use `:utc_datetime` for storing your timestamps, change the migration to `:naive_datetime`.
This was changed in Ecto 2.1, see the [CHANGELOG.md](https://github.com/elixir-ecto/ecto/blob/v2.1/CHANGELOG.md) for
more details.

5. run the migration:

Expand Down
2 changes: 1 addition & 1 deletion lib/mix/tasks/papertrail/install.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule Mix.Tasks.Papertrail.Install do
add :item_changes, :map
add :meta, :map

add :inserted_at, :datetime, null: false
add :inserted_at, :utc_datetime, null: false
end

# Uncomment if you want to add the following indexes to speed up special queries:
Expand Down