Skip to content

Commit

Permalink
Merge pull request #5 from joshuataylor/ecto-2-1-utc-datetime
Browse files Browse the repository at this point in the history
Support Ecto 2.1, by using utc_datetime as default
  • Loading branch information
izelnakri committed Jan 20, 2017
2 parents ba3ad71 + 31adf8c commit c99f2ff
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 c99f2ff

Please sign in to comment.