type "citext" does not exist

During the "Integrating Ash Authentication and Phoenix" tutorial I get this migration:

create table(:users, primary_key: false) do
  add :id, :uuid, null: false, primary_key: true
  add :email, :citext, null: false
  #           ^^^^^^^
  add :hashed_password, :text, null: false
end


That results in the following error:

12:42:19.145 [info] create table users
** (Postgrex.Error) ERROR 42704 (undefined_object) type "citext" does not exist
    (ecto_sql 3.9.2) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1


https://hexdocs.pm/ash_postgres/AshPostgres.Repo.html says that I need to install the citext extension. But how do I do that?

There is the following example code but I don't know where to put it.
Was this page helpful?