datomic

Hüseyin Yavaş 2025-06-26T22:19:31.518199Z

Hi everyone, I'm using Datomic Pro with PostgreSQL and trying to enable :db/fulltext true on existing attributes (e.g., :user/name). I've tried two main approaches, but neither worked as expected: 1. Direct Schema Update on Existing DB: Transacted the db/fulltext schema addition directly. I got this error: ":db.error/invalid-alter-attribute Error: {:db/error :db.error/unsupported-alter-schema, :entity :user/username, :attribute :db/fulltext, :from :disabled, :to true}" 1. Backup/Restore to New DB + Schema Update:bin/datomic backup-db (old PG-backed DB) ◦ bin/datomic create-database (initialize new PG DB for Datomic) ◦ bin/datomic restore-db (backup to new DB) ◦ Transacted db/fulltext schema addition on the restored DB. ◦ I got this error: java.lang.IllegalArgumentException: :restore/collision The name 'test' is already in use by a different database Any advice on troubleshooting this specific scenario would be greatly appreciated. Thanks!

favila 2025-06-26T22:37:57.409959Z

You cannot change fultextness of an attribute after it is created. Only https://docs.datomic.com/schema/schema-change.html are supported.

favila 2025-06-26T22:40:53.390279Z

Your backup/restore issue looks completely unrelated, like you tried to restore-db to a name that already exists in the target storage? Are you sure you got as far as transacting?

favila 2025-06-26T22:41:19.584049Z

Note the error: java.lang.IllegalArgumentException: :restore/collision The name 'test' is already in use by a different database

favila 2025-06-26T22:43:04.968429Z

which I would expect from the restore-db command

favila 2025-06-26T22:43:11.743749Z

also note there's no such command as bin/datomic create-database