Skip to content

Commit 5e7cb26

Browse files
committed
feat: add location fields
1 parent 0c9f75d commit 5e7cb26

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

lib/algora/jobs/schemas/job_posting.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ defmodule Algora.Jobs.JobPosting do
2424
field :seniority, :string
2525
field :system_tags, {:array, :string}, default: []
2626

27+
field :location_meta, :map
28+
field :location_iso_lvl4, :string
29+
2730
belongs_to :user, User, null: false
2831
has_many :interviews, Algora.Interviews.JobInterview, foreign_key: :job_posting_id
2932
has_many :matches, Algora.Matches.JobMatch, foreign_key: :job_posting_id
@@ -49,7 +52,9 @@ defmodule Algora.Jobs.JobPosting do
4952
:seniority,
5053
:countries,
5154
:regions,
52-
:system_tags
55+
:system_tags,
56+
:location_meta,
57+
:location_iso_lvl4
5358
])
5459
|> generate_id()
5560
|> validate_required([:url, :company_name, :company_url, :email])
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
defmodule Algora.Repo.Migrations.AddLocationFieldsToJobPostings do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:job_postings) do
6+
add :location_meta, :map
7+
add :location_iso_lvl4, :string
8+
end
9+
end
10+
end

0 commit comments

Comments
 (0)