defmodule DaProductApp.Repo.Migrations.CreateMypinpadTokens do use Ecto.Migration def change do create table(:mypinpad_tokens) do add :access_token, :string add :expires_at, :utc_datetime add :host_id, references(:mypinpad_hosts, type: :bigint, on_delete: :delete_all) timestamps() end create unique_index(:mypinpad_tokens, [:access_token]) end end