How to remove attributes in Datomic?

I created a set of attributes in a Datomic schema. Theirs: db / idents are grouped into three namespaces :: name ,: tree ,: node. Now I want to delete all of them and start a new one. I found all the necessary attributes:

(def results 
  (q '[:find ?e 
       :where [?e :db/ident ?v]
              [(namespace ?v) ?res]
              [(contains? #{"task", "node", "tree"} ?res)]
     ] 
     (db conn)))

Then a set of retractEntity statements was created:

(def retract-statements 
  (into [] (map #(vector :db.fn/retractEntity (first %1)) results)))

And now I am trying to invoke a transaction:

@(d/transact conn [retract-statements])

This gives me:: db.error / invalid-attribute A schema change should be followed by: db.install / attribute or: db.alter / attribute

Apparently I'm doing something wrong. Can anybody help?

Thank!

+4
source share
1 answer

Datomic. , , . , , Datomic ( ) - , , , .

, , , - .

+6

All Articles