John
John

Reputation: 230

Is it possible to excise an attribute in datomic?

I am trying to modify a schema, and I'd like to get rid of some unused attributes. Is it possible to achieve this, perhaps through excision?

Upvotes: 1

Views: 242

Answers (1)

Michel
Michel

Reputation: 2474

Excision could work and removing an attribute is an explicit use case of it.

However you need to make sure you really want to remove it because excision is a pretty dangerous process and heavy on ressources. Unless you really have legal requirements to remove the data an alternative approach could be more appropriate.

For exmple, you could rename your attribute (with a naming convention of your choice like obsolete-*, set the :db/noHistory flag to true to reduce storage requirements and disable indexing of this attribute if it was indexed (see Schema alteration section).

Anyhow make sure you do backups before any operations and thoroughly make sure that no other part of your code relies on it.

Upvotes: 2

Related Questions