Skip to content

Commit

Permalink
Remove obsolete changeset/2 function from projection version schema
Browse files Browse the repository at this point in the history
  • Loading branch information
slashdotdash committed Jan 18, 2024
1 parent 6aa182b commit ae241d5
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/projections/ecto.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ defmodule Commanded.Projections.Ecto do
use Ecto.Schema
use Commanded.Event.Handler, @handler_opts

import Ecto.Changeset
import Ecto.Query
import unquote(__MODULE__)

Expand Down Expand Up @@ -205,24 +204,15 @@ defmodule Commanded.Projections.Ecto do
quote do
defmodule ProjectionVersion do
@moduledoc false

use Ecto.Schema

import Ecto.Changeset

@primary_key {:projection_name, :string, []}

schema "projection_versions" do
field(:last_seen_event_number, :integer)

timestamps(type: :naive_datetime_usec)
end

@required_fields ~w(last_seen_event_number)a

def changeset(model, params \\ :invalid) do
cast(model, params, @required_fields)
end
end
end
end
Expand Down

0 comments on commit ae241d5

Please sign in to comment.