| 15 | pub const BUILD_VERSION: &str = env!("ATOMIC_BUILD_VERSION"); |
| 16 | |
| 17 | pub(crate) fn record_open(txn: &WriteTransaction, is_new: bool) -> PristineResult<()> { |
| 18 | let mut meta = txn.open_table(ATOMIC_META)?; |
| 19 | if is_new && meta.get(CREATED_WITH_KEY)?.is_none() { |
| 20 | meta.insert(CREATED_WITH_KEY, BUILD_VERSION.as_bytes())?; |
| 21 | } |
| 22 | meta.insert(LAST_WRITABLE_OPEN_WITH_KEY, BUILD_VERSION.as_bytes())?; |
| 23 | Ok(()) |
| 24 | } |
| 25 | |
| 26 | /// Record a completed migration in the same transaction as its schema changes. |
| 27 | pub fn record_migration(txn: &WriteTransaction) -> PristineResult<()> { |