Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20210203141144_add_featured_address_to_users.exs 472B

1234567891011121314151617181920212223
  1. defmodule Pleroma.Repo.Migrations.AddFeaturedAddressToUsers do
  2. use Ecto.Migration
  3. def up do
  4. alter table(:users) do
  5. add(:featured_address, :string)
  6. end
  7. create(index(:users, [:featured_address]))
  8. execute("""
  9. update users set featured_address = concat(ap_id, '/collections/featured') where local = true and featured_address is null;
  10. """)
  11. end
  12. def down do
  13. alter table(:users) do
  14. remove(:featured_address)
  15. end
  16. end
  17. end