Skip to content

Commit

Permalink
0.6.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Mar 14, 2017
1 parent 22d283b commit 7f56090
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ defmodule Repo.Migrations.AddVersions do
def change do
create table(:companies) do
add :name, :string, null: false
add :founded_in, :string
add :founded_in, :date

# null constraints are highly suggested:
add :first_version_id, references(:versions), null: false
Expand All @@ -214,7 +214,7 @@ defmodule Company do

schema "companies" do
field :name, :string
field :founded_in, :string
field :founded_in, :date

belongs_to :first_version, PaperTrail.Version
belongs_to :current_version, PaperTrail.Version, on_replace: :update # on_replace: is important!
Expand Down
1 change: 0 additions & 1 deletion lib/paper_trail.ex
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ defmodule PaperTrail do
end
end

defp make_version_struct(event_list, model, options \\ [])
defp make_version_struct(%{event: "insert"}, model, options) do
%Version{
event: "insert",
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ defmodule PaperTrail.Mixfile do
def project do
[
app: :paper_trail,
version: "0.5.3",
elixir: "~> 1.3",
version: "0.6.0",
elixir: "~> 1.4",
description: description(),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
Expand Down
2 changes: 1 addition & 1 deletion test/paper_trail_strict_mode_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ defmodule PaperTrailStrictModeTest do

test "PaperTrail.delete\\2 with an error returns and error tuple like Repo.delete\\2" do
{:ok, insert_company_result} = create_company_with_version()
{:ok, insert_person_result} = Person.changeset(%Person{}, %{
Person.changeset(%Person{}, %{
first_name: "Izel",
last_name: "Nakri",
gender: true,
Expand Down
2 changes: 1 addition & 1 deletion test/paper_trail_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ defmodule PaperTrailTest do

test "PaperTrail.delete\\2 with an error returns and error tuple like Repo.delete\\2" do
{:ok, insert_company_result} = create_company_with_version()
{:ok, insert_person_result} = Person.changeset(%Person{}, %{
Person.changeset(%Person{}, %{
first_name: "Izel",
last_name: "Nakri",
gender: true,
Expand Down
1 change: 0 additions & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ defmodule User do
use Ecto.Schema

import Ecto.Changeset
import Ecto.Query

schema "users" do
field :token, :string
Expand Down

0 comments on commit 7f56090

Please sign in to comment.