summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs')
-rw-r--r--priv/repo/migrations/20181218172826_users_and_activities_flake_id.exs4
1 files changed, 3 insertions, 1 deletions
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!