A legacy change store holding only provenance journal state, as in production.
(path: &Path)
| 48 | |
| 49 | /// A legacy change store holding only provenance journal state, as in production. |
| 50 | fn legacy_changes(path: &Path) { |
| 51 | let db = Database::create(path).unwrap(); |
| 52 | let txn = db.begin_write().unwrap(); |
| 53 | { |
| 54 | let mut meta = txn.open_table(PROVENANCE_STORE_META).unwrap(); |
| 55 | meta.insert("schema_version", 1).unwrap(); |
| 56 | meta.insert("next_provenance_id", 3).unwrap(); |
| 57 | let mut turns = txn.open_table(PROVENANCE_TURNS).unwrap(); |
| 58 | turns.insert(1, b"turn one".as_slice()).unwrap(); |
| 59 | turns.insert(2, b"turn two".as_slice()).unwrap(); |
| 60 | txn.open_table(CHANGE_META).unwrap(); |
| 61 | } |
| 62 | txn.commit().unwrap(); |
| 63 | } |
| 64 | |
| 65 | fn open_sources(paths: &[&Path]) -> LegacyDatabases { |
| 66 | let mut legacy = LegacyDatabases::new(); |
no test coverage detected