<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks for the report on qt-project, I just faced this exact same issue this afternoon (my app is not released yet but I already wanted to see if a DB update will be possible).<br>It's a shame not to be able to open the DB without specifying the version :/<br><br>Waiting for improvements on QML LocalStorage API, I've found out via StackOverflow the "table_info" SQLite Pragma statement: http://www.sqlite.org/pragma.html#pragma_table_info <br>With that, you can either look at the number of columns of your table, or iterate through the rows returned to see if your new column name already exists or not.<br><br>-- <br>Sylvain.<br><br><div>> Date: Sat, 15 Feb 2014 17:42:15 +0100<br>> From: rob@hoelz.ro<br>> To: devel@lists.sailfishos.org<br>> Subject: Re: [SailfishDevel] Getting odd error when attempting to use LocalStorage.changeVersion<br>> <br>> On Sat, 15 Feb 2014 01:47:52 +0100<br>> Rob Hoelz <rob@hoelz.ro> wrote:<br>> <br>> > Hi all,<br>> > <br>> > I'm working on an update for my Sudoku application, and one of the new<br>> > features necessitates a storage schema change.  So I wrote a utility<br>> > function that tries to open a connection with the correct version, and<br>> > falls back to calling db.changeVersion if there is a version mismatch.<br>> > After testing my new code out, I get the following output from my<br>> > application:<br>> > <br>> > [nemo@jolla Databases]$ harbour-sudoku <br>> > [D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using<br>> > Wayland-EGL [W] QQmlImportDatabase::importPlugin:1697 - Module<br>> > 'Sailfish.Silica' does not contain a module identifier directive - it<br>> > cannot be protected from external registrations. [D]<br>> > MLocalThemeDaemonClient::MLocalThemeDaemonClient:81 -<br>> > MLocalThemeDaemonClient::MLocalThemeDaemonClient(const<br>> > QString&,QObject*) Theme:  "jolla-ambient" [D]<br>> > MLocalThemeDaemonClient::MLocalThemeDaemonClient:112 -<br>> > LocalThemeDaemonClient: Looking for assets in<br>> > ("/usr/share/themes/blanco/meegotouch",<br>> > "/usr/share/themes/jolla-ambient/meegotouch") [W]<br>> > QSqlDatabasePrivate::database:280 - QSqlDatabasePrivate::database:<br>> > unable to open database: " " QSqlQuery::prepare: database not open<br>> > DeclarativeCoverWindow: I have a default alpha buffer [W]<br>> > QSqlDatabasePrivate::database:280 - QSqlDatabasePrivate::database:<br>> > unable to open database: " " [W] QSqlDatabasePrivate::database:280 -<br>> > QSqlDatabasePrivate::database: unable to open database: " "<br>> > QSqlQuery::prepare: database not open<br>> > <br>> > Here's the code for the routine in question:<br>> > https://github.com/hoelzro/harbour-sudoku/blob/db-upgrade/qml/pages/SudokuBoard.qml#L126<br>> > <br>> > It looks to me like once LocalStorage attempts to open a database and<br>> > fails, it doesn't actually open databases in the future, but I could<br>> > be misunderstanding something.<br>> > <br>> > If anyone could help, I'd really appreciate it.<br>> > <br>> > Thanks,<br>> > Rob<br>> > _______________________________________________<br>> > SailfishOS.org Devel mailing list<br>> > <br>> <br>> This seems to be a generic Qt issue; I've started a thread here:<br>> <br>> http://qt-project.org/forums/viewthread/38458/<br>> <br>> -Rob<br>> _______________________________________________<br>> SailfishOS.org Devel mailing list<br></div>                                         </div></body>
</html>