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.

32 lines
658B

  1. defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
  2. use Ecto.Migration
  3. # Two-steps alters are intentional.
  4. # When alter of 2 columns is done in a single operation,
  5. # inconsistent failures happen because of index on `email` column.
  6. def up do
  7. execute("create extension if not exists citext")
  8. alter table(:users) do
  9. modify(:email, :citext)
  10. end
  11. alter table(:users) do
  12. modify(:nickname, :citext)
  13. end
  14. end
  15. def down do
  16. alter table(:users) do
  17. modify(:email, :string)
  18. end
  19. alter table(:users) do
  20. modify(:nickname, :string)
  21. end
  22. execute("drop extension if exists citext")
  23. end
  24. end