[#83] container: Remove outdated migration code
All checks were successful
DCO action / DCO (pull_request) Successful in 1m9s
Tests / Tests (1.20) (pull_request) Successful in 1m33s
Tests / Tests (1.19) (pull_request) Successful in 1m40s

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-03-14 10:03:19 +03:00
parent e27b8ad306
commit 42344eaa69

View file

@ -94,26 +94,6 @@ func _deploy(data any, isUpdate bool) {
if isUpdate { if isUpdate {
args := data.([]any) args := data.([]any)
common.CheckVersion(args[len(args)-1].(int)) common.CheckVersion(args[len(args)-1].(int))
it := storage.Find(ctx, []byte{}, storage.None)
for iterator.Next(it) {
item := iterator.Value(it).(struct {
key []byte
value []byte
})
// Migrate container.
if len(item.key) == containerIDSize {
storage.Delete(ctx, item.key)
storage.Put(ctx, append([]byte{containerKeyPrefix}, item.key...), item.value)
}
// Migrate owner-cid map.
if len(item.key) == 25 /* owner id size */ +containerIDSize {
storage.Delete(ctx, item.key)
storage.Put(ctx, append([]byte{ownerKeyPrefix}, item.key...), item.value)
}
}
return return
} }