25 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
26 Components.utils.import(
"resource://app/jsmodules/sbLocalDatabaseMigrationUtils.jsm");
27 Components.utils.import(
"resource://app/jsmodules/SBJobUtils.jsm");
29 const Cc = Components.classes;
30 const Ci = Components.interfaces;
31 const Cr = Components.results;
37 dump(
"----++++----++++sbLibraryMigration " +
40 "\n----++++----++++\n");
45 SBLocalDatabaseMigrationUtils.BaseMigrationHandler.call(
this);
54 __proto__: SBLocalDatabaseMigrationUtils.BaseMigrationHandler.prototype,
57 classID: Components.ID(
"{7f77e6fa-b3b0-40d5-88f8-203482abfbd9}"),
58 contractID: SBLocalDatabaseMigrationUtils.baseHandlerContractID +
64 migrate:
function sbLibraryMigration_migrate(aLibrary) {
66 this._databaseGUID = aLibrary.databaseGuid;
67 this._databaseLocation = aLibrary.databaseLocation;
70 var query = this.createMigrationQuery(aLibrary);
71 query.addQuery(
"CREATE INDEX idx_resource_properties_property_id_obj_sortable_obj_secondary_sortable_media_item_id_asc on resource_properties (property_id, obj_sortable ASC, obj_secondary_sortable ASC, media_item_id ASC)");
72 query.addQuery(
"CREATE INDEX idx_resource_properties_property_id_obj_sortable_obj_secondary_sortable_media_item_id_desc on resource_properties (property_id, obj_sortable DESC, obj_secondary_sortable DESC, media_item_id DESC)");
73 query.addQuery(
"REINDEX");
74 query.addQuery(
"ANALYZE");
75 query.addQuery(
"COMMIT");
77 this.migrationQuery = query;
79 var sip =
Cc[
"@mozilla.org/supports-interface-pointer;1"]
80 .createInstance(
Ci.nsISupportsInterfacePointer);
83 this._titleText =
"Library Migration Helper";
84 this._statusText =
"Migrating 1.8 database to 1.9 database...";
86 query.setAsyncQuery(
true);
89 this.startNotificationTimer();
90 SBJobUtils.showProgressDialog(sip.data,
null, 0);
91 this.stopNotificationTimer();
94 dump(
"Exception occured: " + e);
104 return XPCOMUtils.generateModule([
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
function sbLibraryMigration()
function NSGetModule(compMgr, fileSpec)
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
sbDeviceFirmwareAutoCheckForUpdate prototype classID