democracyworks / datomic-toolbox

Datomic Utility Library
19 stars 0 forks source link

Migration txInstant #16

Closed cap10morgan closed 7 years ago

cap10morgan commented 7 years ago

If you're trying to set historical txInstants in your own data, you need these schema migration transactions to start earlier than all of that (txInstants may only increase monotonically).

We're doing that in some ballot-scout tests of the new "stats by day" API endpoint. This is the ballot-scout PR for that.

cap10morgan commented 7 years ago

@tie-rack Good questions, all. Right now our only use case is using it in a test config w/ an in-memory transactor. The only other use case I can think of would be in a data import script of some kind (moving data from one transactor to another w/o losing the original txInstants).

Maybe I should add something to the README about the intended use cases here? Because yeah, it's going to fall apart pretty quickly in lots of other scenarios as you point out.

cap10morgan commented 7 years ago

@ddellacosta That look OK/better to you?

ddellacosta commented 7 years ago

@cap10morgan Oh yeah, definitely!