X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20181218172826_users_and_activities_flake_id.exs;h=a5b4c543da9625f6dc5b2a09c3b6b6f3338bfbeb;hb=f1c77f968271fbf29225d980817f32f81d3873b5;hp=47d2d02da29e1982a8d93980a5f7ab25c6e41877;hpb=627e5a0a4992cc19fc65a7e93a09c470c8e2bf33;p=akkoma diff --git a/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs b/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs index 47d2d02da..a5b4c543d 100644 --- a/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs +++ b/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs @@ -12,7 +12,7 @@ defmodule Pleroma.Repo.Migrations.UsersAndActivitiesFlakeId do # 4- update relation pkeys with the new ids # 5- rename the temporary column to id # 6- re-create the constraints - def change do + def up do # Old serial int ids are transformed to 128bits with extra padding. # The application (in `Pleroma.FlakeId`) handles theses IDs properly as integers; to keep compatibility # with previously issued ids. @@ -75,6 +75,8 @@ defmodule Pleroma.Repo.Migrations.UsersAndActivitiesFlakeId do stop_clippy_heartbeats(clippy) end + def down, do: :ok + defp start_clippy_heartbeats() do count = from(a in "activities", select: count(a.id)) |> Repo.one!