20 lines
538 B
Elixir
20 lines
538 B
Elixir
defmodule Comfycamp.Repo.Migrations.OidcCode do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:oidc_codes, primary_key: false) do
|
|
add :value, :string, null: false, primary_key: true
|
|
add :user_id, references(:users, on_delete: :delete_all), null: false
|
|
|
|
add :oidc_app_id,
|
|
references(:oidc_apps, type: :string, column: :client_id, on_delete: :delete_all),
|
|
null: false
|
|
|
|
timestamps(type: :utc_datetime, updated_at: false)
|
|
end
|
|
end
|
|
|
|
def down do
|
|
drop table(:oidc_codes)
|
|
end
|
|
end
|