mirror of
https://github.com/plausible/analytics.git
synced 2024-11-24 04:32:57 +03:00
15 lines
360 B
Elixir
15 lines
360 B
Elixir
|
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
|