aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlsqldatabase/data/changeVersion.qml
blob: fbd770740d643ca411fc1635fb4d5dced4cd03f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQml 2.2
import QtQuick.LocalStorage 2.0

QtObject {
    property var db;
    property string version;

    function create() {
        db = LocalStorage.openDatabaseSync("testdb", "2", "stuff for testing", 100000);
        version = db.version;
    }

    function upgrade() {
        db = db.changeVersion(db.version, "22", function(y) {});
        version = db.version;
    }
}