-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
``` mix phx.gen.context IndexingPipeline ProcessorMarker processor_markers cache_location:utc_datetime cache_version:integer type:string ``` Co-authored-by: Amin Zare <[email protected]> Co-authored-by: Trey Pendragon <[email protected]> Co-authored-by: Eliot Jordan <[email protected]> Co-authored-by: Shaun Ellis <[email protected]>
- Loading branch information
1 parent
f79e2f4
commit f0e0b55
Showing
6 changed files
with
225 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
lib/dpul_collections/indexing_pipeline/processor_marker.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule DpulCollections.IndexingPipeline.ProcessorMarker do | ||
use Ecto.Schema | ||
import Ecto.Changeset | ||
|
||
schema "processor_markers" do | ||
field :type, :string | ||
field :cache_location, :utc_datetime | ||
field :cache_version, :integer | ||
|
||
timestamps(type: :utc_datetime) | ||
end | ||
|
||
@doc false | ||
def changeset(processor_marker, attrs) do | ||
processor_marker | ||
|> cast(attrs, [:cache_location, :cache_version, :type]) | ||
|> validate_required([:cache_location, :cache_version, :type]) | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
priv/repo/migrations/20240724204108_create_processor_markers.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
defmodule DpulCollections.Repo.Migrations.CreateProcessorMarkers do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create table(:processor_markers) do | ||
add :cache_location, :utc_datetime | ||
add :cache_version, :integer | ||
add :type, :string | ||
|
||
timestamps(type: :utc_datetime) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters