atlas: Atlas migrate diff fails with `type "public.citext" does not exist`
Hi everyone, we have been using atlas for a while now and we have not encounterted this error before. We have a multiple tables (> 100) in public schema of our postgres DB. We generate migrations by giving a path to the migrations directory and schema.sql file, like so:
atlas migrate diff MIGRATION_NAME --dir "file://remote/db/migrations" --to "file://remote/db/schema.sql" --dev-url 'postgres://username:password@localhost:5432/dev_db?sslmode=disable'
All of a sudden this started failing with all sorts of errors. First it failed with database not clean saying some table was found. We were on a quite old version of atlas, so we updated it to the latest version, and now it is failing with:
Error: pq: type "public.citext" does not exist
But we already have
CREATE EXTENSION IF NOT EXISTS "citext";
and it hasn’t failed so far. What do we do here? Any help is very appreciated.
Thanks in advance.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (11 by maintainers)
Okay, thank you. I’ll send you a DM on discord. I have checked that the
citextis at the very top of the very first migration file in atlas.su.