mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 01:22:15 +03:00
Add email_activation_codes
table (#3426)
* Add email_activation_codes table * Change code column in migration to string
This commit is contained in:
parent
d338980dc5
commit
87f7729cf9
@ -0,0 +1,14 @@
|
|||||||
|
defmodule Plausible.Repo.Migrations.AddEmailActivationCodes do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
create table(:email_activation_codes) do
|
||||||
|
add :code, :text, null: false
|
||||||
|
add :user_id, references(:users, on_delete: :delete_all), null: false
|
||||||
|
|
||||||
|
add :issued_at, :naive_datetime, null: false
|
||||||
|
end
|
||||||
|
|
||||||
|
create unique_index(:email_activation_codes, :user_id)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user