Fork me on GitHub

I've got a problem with the automatic migration feature of RAD. I've introduced the following attributes, trying to

(datomic-common/automatic-schema model/all-attributes :production)
  :db/cardinality :db.cardinality/one,
  :db/valueType :db.type/long,
  :db/doc "Deprecated. This is an integer field, but we need decimals. Use instead.",
  :sil.schema/deprecated? true,
  :sil.schema/replaced-by []}

#:db{:ident :sil.schema/deprecated?,
      :cardinality :db.cardinality/one,
      :valueType :db.type/boolean,
      :doc "Boolean flag indicating the field has been deprecated"}

#:db{:ident :sil.schema/replaced-by,
     :cardinality :db.cardinality/many,
     :valueType :db.type/ref,
     :doc "Used to document when a deprecated field is replaced by others."}
If I add the :sil.schema/deprecated? and replaced-by attributes manually, before starting the automatic migration everything works fine. But letting it run automatically on an empty DB throws this:
Execution error (ExceptionInfo) at datomic.core.error/raise (error.clj:55).
:db.error/not-an-entity Unable to resolve entity: :sil.schema/deprecated?
So when transacting the automatic-schema does the order of the attributes matter, or do we always need to transact schema extending attributes beforehand?


RAD schema support understands that tuples need to run in their own txn to make sure the others exist first. There is no (existing) mechanism to do what you’re doing into the automatic system…you’d need to add that as a migration system, since it is meant to migrate things that already existed on startup.


understood, thanks!


[JOB] Hi all, At Skipp Technologies, we’re looking for a contractor to add a few new sections to our existing Fulcro app, asap.. Let me know if you’re interested in hearing more. DM me here, or email <mailto:[email protected]|[email protected]> or see more on our AngelList post:

💯 2