analytics/priv/repo/migrations/20210128084657_create_api_keys.exs

15 lines
360 B
Elixir
Raw Normal View History

defmodule Plausible.Repo.Migrations.CreateApiKeys do
use Ecto.Migration
def change do
create table(:api_keys) do
add :user_id, references(:users, on_delete: :delete_all), null: false
add :name, :string, null: false
add :key_prefix, :string, null: false
add :key_hash, :string, null: false
timestamps()
end
end
end