Skip to content

Commit f121bec

Browse files
committed
feat: add primary tech and tag fields
1 parent b81dda5 commit f121bec

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

lib/algora/jobs/jobs.ex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ defmodule Algora.Jobs do
4646
query
4747
end
4848

49+
query =
50+
if opts[:dripped_only] do
51+
where(
52+
query,
53+
[j, u],
54+
not u.contract_signed and fragment("exists (select 1 from drips where drips.org_id = ?)", u.id)
55+
)
56+
else
57+
query
58+
end
59+
4960
query
5061
|> Repo.all()
5162
|> apply_preloads(opts)

lib/algora/jobs/schemas/job_posting.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ defmodule Algora.Jobs.JobPosting do
2323
field :compensation, :string
2424
field :seniority, :string
2525
field :system_tags, {:array, :string}, default: []
26+
field :primary_tech, :string
27+
field :primary_tag, :string
2628

2729
field :location_meta, :map
2830
field :location_iso_lvl4, :string
@@ -54,7 +56,9 @@ defmodule Algora.Jobs.JobPosting do
5456
:regions,
5557
:system_tags,
5658
:location_meta,
57-
:location_iso_lvl4
59+
:location_iso_lvl4,
60+
:primary_tech,
61+
:primary_tag
5862
])
5963
|> generate_id()
6064
|> 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.AddPrimaryTechAndPrimaryTagToJobPostings do
2+
use Ecto.Migration
3+
4+
def change do
5+
alter table(:job_postings) do
6+
add :primary_tech, :string
7+
add :primary_tag, :string
8+
end
9+
end
10+
end

0 commit comments

Comments
 (0)