diff options
-rw-r--r-- | lib/pleroma/migration_helper/object_id.ex | 10 | ||||
-rw-r--r-- | test/pleroma/migration_helper/object_id_test.exs | 6 |
2 files changed, 0 insertions, 16 deletions
diff --git a/lib/pleroma/migration_helper/object_id.ex b/lib/pleroma/migration_helper/object_id.ex index 44af99c8d..3cc487523 100644 --- a/lib/pleroma/migration_helper/object_id.ex +++ b/lib/pleroma/migration_helper/object_id.ex @@ -36,16 +36,6 @@ defmodule Pleroma.MigrationHelper.ObjectId do |> Repo.update_all(set: [{field, new_id}]) end - @doc "Shift a FlakeId by N places." - def shift_id(flake_id, n) when is_integer(n) do - flake_id - |> FlakeId.from_string() - |> FlakeId.to_integer() - |> Kernel.+(n) - |> FlakeId.from_integer() - |> FlakeId.to_string() - end - @doc "Generate a FlakeId from a datetime." @spec flake_from_time(NaiveDateTime.t()) :: flake_id :: String.t() def flake_from_time(%NaiveDateTime{} = dt) do diff --git a/test/pleroma/migration_helper/object_id_test.exs b/test/pleroma/migration_helper/object_id_test.exs index 45567f54a..ddd2cfbd4 100644 --- a/test/pleroma/migration_helper/object_id_test.exs +++ b/test/pleroma/migration_helper/object_id_test.exs @@ -6,12 +6,6 @@ defmodule Pleroma.MigrationHelper.ObjectIdTest do use Pleroma.DataCase, async: true alias Pleroma.MigrationHelper.ObjectId - test "shift_id/2" do - id = "AEma8DXGjGtUDO6Qeu" - assert ObjectId.shift_id(id, 1) == "AEma8DXGjGtUDO6Qev" - assert ObjectId.shift_id(id, -1) == "AEma8DXGjGtUDO6Qet" - end - test "flake_from_time/1" do now = NaiveDateTime.utc_now() id = ObjectId.flake_from_time(now) |