Querying a materialized view: relation does not exist

I define a materialized view as such:
export const usersMv = pgMaterializedView("users_mv").as(
  (qb) => {
    return qb
      .select({
        name: users.name,
      })
      .from(users)
  }
)


Then I query this materialized view:
  const results = await db
    .select()
    .from(usersMv)


But I get the error:
NeonDbError: relation "users_mv" does not exist


I'm using Neon.
Does Drizzle know how to create the materialized view for me?
Was this page helpful?