Skip to content

Commit

Permalink
Rename configurator users table (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-Sanchez authored Jul 18, 2024
1 parent 1c0441c commit 28c853d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/configurator/lib/configurator/accounts/user.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Configurator.Accounts.User do
use Configurator.Schema
import Ecto.Changeset

schema "users" do
schema "configurator_users" do
field :email, :string
field :password, :string, virtual: true, redact: true
field :hashed_password, :string, redact: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ defmodule Configurator.Repo.Migrations.CreateUsersAuthTables do
def change do
execute "CREATE EXTENSION IF NOT EXISTS citext", ""

create table(:users) do
create table(:configurator_users) do
add :email, :citext, null: false
add :hashed_password, :string, null: false
add :confirmed_at, :naive_datetime
timestamps(type: :utc_datetime)
end

create unique_index(:users, [:email])
create unique_index(:configurator_users, [:email])

create table(:users_tokens) do
add :user_id, references(:users, on_delete: :delete_all), null: false
add :user_id, references(:configurator_users, on_delete: :delete_all), null: false
add :token, :binary, null: false
add :context, :string, null: false
add :sent_to, :string
Expand Down

0 comments on commit 28c853d

Please sign in to comment.