MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / record_migration

Function record_migration

atomic-core/src/pristine/build_metadata.rs:27–31  ·  view source on GitHub ↗

Record a completed migration in the same transaction as its schema changes.

(txn: &WriteTransaction)

Source from the content-addressed store, hash-verified

25
26/// Record a completed migration in the same transaction as its schema changes.
27pub fn record_migration(txn: &WriteTransaction) -> PristineResult<()> {
28 let mut meta = txn.open_table(ATOMIC_META)?;
29 meta.insert(MIGRATED_WITH_KEY, BUILD_VERSION.as_bytes())?;
30 Ok(())
31}
32
33/// Read a recorded build identity without creating metadata in legacy databases.
34pub fn read_version(txn: &redb::ReadTransaction, key: &str) -> PristineResult<Option<String>> {

Calls 2

insertMethod · 0.45
as_bytesMethod · 0.45