Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Upgrade app without restarting the sqlite database
Forum Updated to NodeBB v4.3 + New Features

Upgrade app without restarting the sqlite database

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adrz1
    wrote on last edited by
    #1

    Hi,

    i am working in an App that uses a sqlite database, the database is deployed as a DEPLOYMENTFOLDER in the .pro file:

    @folder_01.source = qml/MyApp
    folder_01.target = qml
    unix: {
    folder_02.source = data/myapp.sql
    }
    win32: {
    folder_02.source = data/*.sql
    }
    DEPLOYMENTFOLDERS = folder_01 folder_02@

    But this causes the database reset if a new reléase of my App is available on the store, how can i solve this? Is there any other way of using databases? I have seen in Android if you overrides SQLiteHelper you can define the operations in the database when installing for first time and when upgrading the application.

    Thanks

    1 Reply Last reply
    0
    • N Offline
      N Offline
      N3Roaster
      wrote on last edited by
      #2

      Would it be practical to, rather than ship a database file that has been prepared in advance, just have the app create the database file itself? If so, that's probably the easiest approach and has the advantage that if someone accidentally deletes the database file after installation your app can just regenerate it. Another option would be to put the database file in a resource and have your program copy that to the appropriate place only if there isn't already something there, but that approach is much less flexible and I wouldn't normally recommend it.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved