Page MenuHomePhorge

20210203141144_add_featured_address_to_users.exs
No OneTemporary

Size
631 B
Referenced Files
None
Subscribers
None

20210203141144_add_featured_address_to_users.exs

# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Repo.Migrations.AddFeaturedAddressToUsers do
use Ecto.Migration
def up do
alter table(:users) do
add(:featured_address, :string)
end
create(index(:users, [:featured_address]))
execute("""
update users set featured_address = concat(ap_id, '/collections/featured') where local = true and featured_address is null;
""")
end
def down do
alter table(:users) do
remove(:featured_address)
end
end
end

File Metadata

Mime Type
text/x-ruby
Expires
Tue, Jan 20, 12:58 PM (11 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
973597
Default Alt Text
20210203141144_add_featured_address_to_users.exs (631 B)

Event Timeline