working to get bones73k up to par with work done on shift73k
This commit is contained in:
parent
19f14f7046
commit
2e61ee0031
14 changed files with 73 additions and 134 deletions
priv/repo/migrations
|
@ -8,6 +8,7 @@ defmodule Bones73k.Repo.Migrations.CreateUsersAuthTables do
|
|||
add(:id, :binary_id, primary_key: true)
|
||||
add(:email, :citext, null: false)
|
||||
add(:hashed_password, :string, null: false)
|
||||
add(:role, :string, null: false)
|
||||
add(:confirmed_at, :naive_datetime)
|
||||
timestamps()
|
||||
end
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
defmodule Bones73k.Repo.Migrations.AddRoleToUsers do
|
||||
use Ecto.Migration
|
||||
|
||||
alias Bones73k.Accounts.User.RolesEnum
|
||||
|
||||
def up do
|
||||
RolesEnum.create_type()
|
||||
|
||||
alter table(:users) do
|
||||
add(:role, RolesEnum.type(), null: false)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:users) do
|
||||
remove(:role)
|
||||
end
|
||||
|
||||
RolesEnum.drop_type()
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue