27 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
28 Components.utils.import(
"resource://app/jsmodules/ArrayConverter.jsm");
29 Components.utils.import(
"resource://app/jsmodules/sbLocalDatabaseMigrationUtils.jsm");
30 Components.utils.import(
"resource://app/jsmodules/SBJobUtils.jsm");
32 const Cc = Components.classes;
33 const Ci = Components.interfaces;
34 const Cr = Components.results;
37 dump(
"----++++----++++\sbLocalDatabaseMigrate070to08pre1 ---> " +
39 "\n----++++----++++\n");
44 SBLocalDatabaseMigrationUtils.BaseMigrationHandler.call(
this);
55 __proto__: SBLocalDatabaseMigrationUtils.BaseMigrationHandler.prototype,
57 classDescription:
'Songbird Migration Handler for 0.7.0 to 0.8.0 pre with no content hash',
58 classID: Components.ID(
"{b080f650-7ef2-11dd-ad8b-a0800200c9a6}"),
59 contractID: SBLocalDatabaseMigrationUtils.baseHandlerContractID +
"0.7.0 to 0.8.0 pre1",
61 _databaseLocation:
null,
66 migrate:
function sbLDBM070to08pre1_migrate(aLibrary) {
67 this._databaseGUID = aLibrary.databaseGuid;
68 this._databaseLocation = aLibrary.databaseLocation;
70 var query = this._createQuery();
71 query.addQuery(
"begin");
74 query.addQuery(
"drop index idx_media_items_content_url_content_hash");
78 query.addQuery(
"update media_items set content_hash=null");
81 query.addQuery(
"update library_metadata set value = '9' where name = 'version'");
84 query.addQuery(
"commit");
87 query.setAsyncQuery(
true);
88 query.execute(retval);
90 var sip =
Cc[
"@mozilla.org/supports-interface-pointer;1"]
91 .createInstance(
Ci.nsISupportsInterfacePointer);
94 this._titleText =
"Library Migration Helper";
95 this._statusText =
"Migrating 0.7.0 database to 0.8.0pre1 database...";
96 this.migrationQuery = query;
98 this.startNotificationTimer();
99 SBJobUtils.showProgressDialog(sip.data,
null, 0);
100 this.stopNotificationTimer();
103 _createQuery:
function sbLDBM070to08pre1_createQuery() {
104 var query =
Cc[
"@songbirdnest.com/Songbird/DatabaseQuery;1"]
105 .createInstance(
Ci.sbIDatabaseQuery);
106 query.databaseLocation = this._databaseLocation;
107 query.setDatabaseGUID(this._databaseGUID);
119 return XPCOMUtils.generateModule([
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
function sbLocalDatabaseMigrate070to08pre1()
sbDeviceFirmwareAutoCheckForUpdate prototype classID