From 5b6d941a364012335874edd8cf7614cf0619b945 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 27 Sep 2021 19:18:34 -0400 Subject: [PATCH] mix format --- lib/philomena/users/user.ex | 10 +++++++++- .../20210921025336_change_image_scale_option_type.exs | 8 +++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/philomena/users/user.ex b/lib/philomena/users/user.ex index 3092153f..bc61db5c 100644 --- a/lib/philomena/users/user.ex +++ b/lib/philomena/users/user.ex @@ -274,7 +274,15 @@ defmodule Philomena.Users.User do def update_changeset(user, attrs, roles) do user - |> cast(attrs, [:name, :email, :role, :secondary_role, :hide_default_role, :senior_staff, :bypass_rate_limits]) + |> cast(attrs, [ + :name, + :email, + :role, + :secondary_role, + :hide_default_role, + :senior_staff, + :bypass_rate_limits + ]) |> validate_required([:name, :email, :role]) |> validate_inclusion(:role, ["user", "assistant", "moderator", "admin"]) |> put_assoc(:roles, roles) diff --git a/priv/repo/migrations/20210921025336_change_image_scale_option_type.exs b/priv/repo/migrations/20210921025336_change_image_scale_option_type.exs index d153c670..2c5f30d5 100755 --- a/priv/repo/migrations/20210921025336_change_image_scale_option_type.exs +++ b/priv/repo/migrations/20210921025336_change_image_scale_option_type.exs @@ -5,9 +5,11 @@ defmodule Philomena.Repo.Migrations.ChangeImageScaleOptionType do alter table(:users) do add :scale_large_images0, :string, default: "true", null: false end - - execute("update users set scale_large_images0 = (case when scale_large_images then 'true' else 'false' end);") - + + execute( + "update users set scale_large_images0 = (case when scale_large_images then 'true' else 'false' end);" + ) + alter table(:users) do remove :scale_large_images end