conformity
conformity copied to clipboard
Best practice for managing schema evolution/norm identity ?
Assuming that schema starts off as an EDN file/resource versioned in git, how to best manage schema evolution in conjunction with conformity?
As per the README, norms are transacted once.
Is a new conformity-attr
used (4-arity call to ensure-conforms
), generate new norm names (per schema "version"), or something else entirely?
Any feedback from any & all much appreciated!
I think the best approach is to build schema incrementally through a number of cumulative immutable transactions.
I think if you wanted to re-write things as you’ve described, you’d either need to blow away your DB, or write schema-alteration transactions to migrate existing databases.
If you're looking to do a migration that changes the schema in a way that Datomic doesn't support, Brambling can help doing the kind of schema alterations that @rkneufeld mentioned. It applies your transformations while it exports the DB to a new DB.