mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +00:00
Migrate with timestamp
This commit is contained in:
parent
9c50bbe23a
commit
bc49f8ca37
1 changed files with 6 additions and 2 deletions
|
@ -206,10 +206,14 @@ async fn do_migrate_hash(old_repo: &ArcRepo, new_repo: &ArcRepo, hash: Hash) ->
|
|||
return Ok(());
|
||||
};
|
||||
|
||||
let _ = new_repo.create_hash(hash.clone(), &identifier).await?;
|
||||
|
||||
if let Some(details) = old_repo.details(&identifier).await? {
|
||||
let _ = new_repo
|
||||
.create_hash_with_timestamp(hash.clone(), &identifier, details.created_at())
|
||||
.await?;
|
||||
|
||||
new_repo.relate_details(&identifier, &details).await?;
|
||||
} else {
|
||||
let _ = new_repo.create_hash(hash.clone(), &identifier).await?;
|
||||
}
|
||||
|
||||
if let Some(identifier) = old_repo.motion_identifier(hash.clone()).await? {
|
||||
|
|
Loading…
Reference in a new issue