send_it/priv/repo/migrations/20241114191936_create_contacts.exs

16 lines
334 B
Elixir

defmodule SendIt.Repo.Migrations.CreateContacts do
use Ecto.Migration
def change do
create table(:contacts) do
add :name, :string
add :email, :string
add :subscribed, :boolean, default: true, null: false
timestamps(type: :utc_datetime)
end
create unique_index(:contacts, [:email])
end
end