Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
472B

  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