hunk.code_window:         else {
               const database: Uint8Array = this.databaseConnection.export();
               // convert Uint8Array to number array to improve local-storage storage
               const databaseArray = [].slice.call(database);
               PlatformTools.getGlobalVariable().localStorage.setItem(path, JSON.stringify(databaseArray));
           }
       }
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:             if (this.options.useLocalforage) {
                   if (window.localforage) {
                       await window.localforage.setItem(path, JSON.stringify(databaseArray));
                   } else {
                       throw new Error(`localforage is not defined - please import localforage.js into your site`);
                   }
               } else {
                   PlatformTools.getGlobalVariable().localStorage.setItem(path, JSON.stringify(databaseArray));
               }
  
hunk.file_path: src/driver/sqljs/SqljsDriver.ts
hunk.type: replace
file: import "reflect-metadata";
  import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
  import {Connection} from "../../../src/connection/Connection";
  import {Post} from "./entity/Post";
  import {expect} from "chai";
  
  describe("github issues > #3374 Synchronize issue with UUID (MySQL)", () => {
  
      let connections: Connection[];
      before(async () => connections = await createTestingConnections({
          entities: [__dirname + "/entity/*{.js,.ts}"],
          subscribers: [__dirname + "/subscriber/*{.js,.ts}"],
          enabledDrivers: ["mysql"]
      }));
      beforeEach(() => reloadTestingDatabases(connections));
      after(() => closeTestingConnections(connections));
  
      it("should not drop primary column again", () => Promise.all(connections.map(async function(connection) {
  
          const post = new Post();
          post.id = 1;
          post.name = "hello world";
          await connection.manager.save(post);
  
          await connection.synchronize();
  
          const loadedPost = await connection.manager.find(Post, { name: "hello world" });
          expect(loadedPost).to.be.not.empty;
  
      })));
  
  });
  