conformity icon indicating copy to clipboard operation
conformity copied to clipboard

Best practice for managing schema evolution/norm identity ?

Open mgrbyte opened this issue 7 years ago • 2 comments

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!

mgrbyte avatar Oct 24 '17 21:10 mgrbyte

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.

avescodes avatar Nov 08 '17 17:11 avescodes

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.

thosmos avatar May 09 '18 07:05 thosmos