Add migration script from old pub-relay

parent d6159be9
require "redis"
old_redis = Redis.new(url: ENV["OLD_REDIS_URL"])
new_redis = Redis.new(url: ENV["NEW_REDIS_URL"])
old_redis.keys("subscription:*").each do |old_key|
inbox_url = old_redis.hget(old_key, "inbox_url").not_nil!
new_key = "relay:#{old_key}"
new_redis.hmset(new_key, {
inbox_url: inbox_url,
follow_id: "",
follow_actor_id: "",
state: "Subscribed",
})
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment