1 defmodule Pleroma.Repo.Migrations.ChangeFollowingRelationshipsStateToInteger do
4 @alter_following_relationship_state "ALTER TABLE following_relationships ALTER COLUMN state"
8 #{@alter_following_relationship_state} TYPE integer USING
10 WHEN state = 'pending' THEN 1
11 WHEN state = 'accept' THEN 2
12 WHEN state = 'reject' THEN 3
20 #{@alter_following_relationship_state} TYPE varchar(255) USING
22 WHEN state = 1 THEN 'pending'
23 WHEN state = 2 THEN 'accept'
24 WHEN state = 3 THEN 'reject'