cannery/priv/repo/migrations/20210903015537_create_ammo_types.exs

31 lines
898 B
Elixir
Raw Normal View History

2021-09-02 23:31:14 -04:00
defmodule Cannery.Repo.Migrations.CreateAmmoTypes do
use Ecto.Migration
def change do
create table(:ammo_types, primary_key: false) do
add :id, :binary_id, primary_key: true
add :name, :string
add :desc, :text
2022-02-05 16:22:02 -05:00
# https://en.wikipedia.org/wiki/Bullet#Abbreviations
2021-09-02 23:31:14 -04:00
add :bullet_type, :string
2022-02-05 16:22:02 -05:00
add :bullet_core, :string
add :cartridge, :string
add :caliber, :string
add :case_material, :string
add :grains, :integer
add :pressure, :string
add :rimfire, :boolean, null: false, default: false
add :tracer, :boolean, null: false, default: false
add :incendiary, :boolean, null: false, default: false
add :blank, :boolean, null: false, default: false
add :corrosive, :boolean, null: false, default: false
2021-09-02 23:31:14 -04:00
add :manufacturer, :string
2022-02-05 16:22:02 -05:00
add :sku, :string
2021-09-02 23:31:14 -04:00
timestamps()
end
end
end