20 lines
477 B
Elixir
20 lines
477 B
Elixir
defmodule Tradex.Repo.Migrations.AddSecuritiesTable do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:securities, primary_key: false) do
|
|
add :id, :binary_id, primary_key: true
|
|
add :name, :string, null: false
|
|
add :ticker, :string
|
|
add :wkn, :string
|
|
add :isin, :string
|
|
add :expiration_date, :date
|
|
add :strike_price, :decimal
|
|
|
|
timestamps(type: :utc_datetime)
|
|
end
|
|
|
|
create unique_index(:securities, [:name])
|
|
end
|
|
end
|