import { BinaryClassUpgrader } from "../storage/binary/BinaryClassUpgrader.js";

export class TagSerializationUpgrader_0_1 extends BinaryClassUpgrader {
    constructor() {
        super();

        this.__startVersion = 0;
        this.__targetVersion = 1;
    }

    upgrade(source, target) {
        const tag = source.readUTF8String();

        //write tag count
        target.writeUintVar(1);
        target.writeUTF8String(tag);
    }
}
