diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-31 09:21:42 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-31 09:21:42 +0300 |
commit | ea9c57b26ed463622e4489736fcddb8fca1b3341 (patch) | |
tree | bc22eaaadc465865517e344385171d64ed445358 /priv | |
parent | 9c94b6a327118d8c7ea21355d6c378ef31c54321 (diff) | |
download | pleroma-ea9c57b26ed463622e4489736fcddb8fca1b3341.tar.gz pleroma-ea9c57b26ed463622e4489736fcddb8fca1b3341.zip |
[#2332] Misc. improvements per code change requests.
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20200328124805_change_following_relationships_state_to_integer.exs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/priv/repo/migrations/20200328124805_change_following_relationships_state_to_integer.exs b/priv/repo/migrations/20200328124805_change_following_relationships_state_to_integer.exs index d5a431c00..2b0820f3f 100644 --- a/priv/repo/migrations/20200328124805_change_following_relationships_state_to_integer.exs +++ b/priv/repo/migrations/20200328124805_change_following_relationships_state_to_integer.exs @@ -1,11 +1,11 @@ defmodule Pleroma.Repo.Migrations.ChangeFollowingRelationshipsStateToInteger do use Ecto.Migration - @alter_apps_scopes "ALTER TABLE following_relationships ALTER COLUMN state" + @alter_following_relationship_state "ALTER TABLE following_relationships ALTER COLUMN state" def up do execute(""" - #{@alter_apps_scopes} TYPE integer USING + #{@alter_following_relationship_state} TYPE integer USING CASE WHEN state = 'pending' THEN 1 WHEN state = 'accept' THEN 2 @@ -17,7 +17,7 @@ defmodule Pleroma.Repo.Migrations.ChangeFollowingRelationshipsStateToInteger do def down do execute(""" - #{@alter_apps_scopes} TYPE varchar(255) USING + #{@alter_following_relationship_state} TYPE varchar(255) USING CASE WHEN state = 1 THEN 'pending' WHEN state = 2 THEN 'accept' |