calendar slug added, settings quick change working
This commit is contained in:
parent
56b72f8038
commit
873723d776
7 changed files with 88 additions and 1 deletions
priv/repo
|
@ -11,10 +11,11 @@ defmodule Shift73k.Repo.Migrations.CreateUsersAuthTables do
|
|||
add(:role, :string, null: false)
|
||||
add(:confirmed_at, :naive_datetime)
|
||||
add(:week_start_at, :string, null: false)
|
||||
add(:calendar_slug, :string, null: false)
|
||||
timestamps()
|
||||
end
|
||||
|
||||
create(unique_index(:users, [:email]))
|
||||
create(unique_index(:users, [:email, :calendar_slug]))
|
||||
|
||||
create table(:users_tokens, primary_key: false) do
|
||||
add(:id, :binary_id, primary_key: true)
|
||||
|
|
|
@ -71,6 +71,7 @@ mock_users =
|
|||
role: String.to_existing_atom(e["role"]),
|
||||
hashed_password: Bcrypt.hash_pwd_salt(e["password"]),
|
||||
week_start_at: Enum.at(week_starts, Enum.random(0..2)),
|
||||
calendar_slug: Ecto.UUID.generate(),
|
||||
inserted_at: add_dt,
|
||||
updated_at: add_dt,
|
||||
confirmed_at: (e["confirmed_at"] && NaiveDateTime.add(add_dt, 300, :second)) || nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue