Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71838

LocalStorage changeVersion requires database reopening

    XMLWordPrintable

Details

    • b799e061a3cbf995ac7c88b315f5916e3a687162

    Description

      The db.changeVersion function does not update the db.version field, so it's not possible to perform successive schema updates like this:

      if(db.version == "1") db.changeVersion("1, "2", ...)

      if(db.version == "2") db.changeVersion("2, "3", ...)

       

      There are possible workarounds, as described here: https://stackoverflow.com/questions/18052225/db-changeversion-doesnt-work-as-expected

       

      The test suite seems to be written with this limitation in mind, and the database is reopened after each schema change. The documentation doesn't mention that this should be required.

       

      To reproduce this, just take the changeversion.js test script and remove all openDatabaseSync calls except for the first one.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            anszom Andrzej Szombierski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes