projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linkify' into 'develop'
[akkoma]
/
priv
/
repo
/
migrations
/
20200328124805_change_following_relationships_state_to_integer.exs
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 d5a431c0000b14520d72af18b19151d9c72ac26c..2b0820f3f9be3ae1bb0e4ac8ed50cab3100707e1 100644
(file)
--- 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
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("""
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
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("""
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'
CASE
WHEN state = 1 THEN 'pending'
WHEN state = 2 THEN 'accept'