Add 16 gauge shotgun caliber
This commit is contained in:
parent
d7c4772ad8
commit
0583bd14cf
4 changed files with 20 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ defmodule Ammoprices.Scraping.Retailers.LuckyGunner do
|
|||
"22-wmr" => "/rimfire/22-wmr-ammo",
|
||||
"17-hmr" => "/rimfire/17-hmr-ammo",
|
||||
"12-gauge" => "/shotgun/12-gauge-ammo",
|
||||
"16-gauge" => "/shotgun/16-gauge-ammo",
|
||||
"20-gauge" => "/shotgun/20-gauge-ammo"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ defmodule Ammoprices.Scraping.Retailers.SgAmmo do
|
|||
"22-wmr" => "/catalog/rimfire-ammo-for-sale/22-wmr-ammo",
|
||||
"17-hmr" => "/catalog/rimfire-ammo-for-sale/17-hmr-ammo",
|
||||
"12-gauge" => "/catalog/shotgun-ammo-for-sale/12-gauge-ammo",
|
||||
"16-gauge" => "/catalog/shotgun-ammo-for-sale/16-gauge-ammo",
|
||||
"20-gauge" => "/catalog/shotgun-ammo-for-sale/20-gauge-ammo"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ defmodule Ammoprices.Scraping.Retailers.TargetSportsUsa do
|
|||
"22-wmr" => "/22-wmr-ammo-c-203.aspx",
|
||||
"17-hmr" => "/17-hmr-ammo-c-198.aspx",
|
||||
"12-gauge" => "/12-gauge-shotgun-ammo-c-747.aspx",
|
||||
"16-gauge" => "/16-gauge-shotgun-ammo-c-748.aspx",
|
||||
"20-gauge" => "/20-gauge-shotgun-ammo-c-749.aspx"
|
||||
}
|
||||
|
||||
|
|
|
|||
17
priv/repo/migrations/20260312140255_add_16_gauge_caliber.exs
Normal file
17
priv/repo/migrations/20260312140255_add_16_gauge_caliber.exs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
defmodule Ammoprices.Repo.Migrations.Add16GaugeCaliber do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
now = DateTime.utc_now() |> DateTime.truncate(:second) |> DateTime.to_naive()
|
||||
|
||||
execute("""
|
||||
INSERT INTO calibers (id, name, slug, category, aliases, inserted_at, updated_at)
|
||||
VALUES (gen_random_uuid(), '16 Gauge', '16-gauge', 'shotgun', '{"16 gauge","16 ga","16ga"}', '#{now}', '#{now}')
|
||||
ON CONFLICT (slug) DO NOTHING
|
||||
""")
|
||||
end
|
||||
|
||||
def down do
|
||||
execute("DELETE FROM calibers WHERE slug = '16-gauge'")
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue