Skip to content

Commit

Permalink
Support Ecto 2.1, by using utc_datetime as default
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuataylor committed Jan 19, 2017
1 parent ba3ad71 commit 31adf8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 31adf8c

Please sign in to comment.