зеркало из https://github.com/mozilla/gecko-dev.git
Bug 702559 - Adapting FHR to mozIStorageAsyncConnection-based Sqlite.jsm;r=gps
This commit is contained in:
Родитель
d982370eb9
Коммит
8cdbf8785d
|
@ -1163,7 +1163,7 @@ MetricsStorageSqliteBackend.prototype = Object.freeze({
|
|||
|
||||
// 1. Create the schema.
|
||||
yield self._connection.executeTransaction(function ensureSchema(conn) {
|
||||
let schema = conn.schemaVersion;
|
||||
let schema = yield conn.getSchemaVersion();
|
||||
|
||||
if (schema == 0) {
|
||||
self._log.info("Creating database schema.");
|
||||
|
@ -1172,7 +1172,7 @@ MetricsStorageSqliteBackend.prototype = Object.freeze({
|
|||
yield self._connection.execute(SQL[k]);
|
||||
}
|
||||
|
||||
self._connection.schemaVersion = 1;
|
||||
yield self._connection.setSchemaVersion(1);
|
||||
doCheckpoint = true;
|
||||
} else if (schema != 1) {
|
||||
throw new Error("Unknown database schema: " + schema);
|
||||
|
|
|
@ -80,7 +80,7 @@ add_task(function test_reconnect() {
|
|||
|
||||
add_task(function test_future_schema_errors() {
|
||||
let backend = yield Metrics.Storage("future_schema_errors");
|
||||
backend._connection.schemaVersion = 2;
|
||||
yield backend._connection.setSchemaVersion(2);
|
||||
yield backend.close();
|
||||
|
||||
let backend2;
|
||||
|
|
Загрузка…
Ссылка в новой задаче