rem: } catch (ex) { dump("error creating table " + table + " -- probably already exists\n"); 
add: checkSchema = false; } }  if (checkSchema) {  var version = this.getSchemaVersion();   if (version < this.DB_SCHEMA_VERSION) {  } else if (version > this.DB_SCHEMA_VERSION) {   var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService);  var brandSb = sbs.createBundle("chrome: var calSb = sbs.createBundle("chrome:  var shortName = brandSb.GetStringFromName("brandShortName");  var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService);  buttonFlags = promptSvc.BUTTON_POS_0 * promptSvc.BUTTON_TITLE_IS_STRING + promptSvc.BUTTON_POS_0_DEFAULT;  var choice = promptSvc.confirmEx( null, calSb.formatStringFromName("tooNewSchemaErrorTitle", [shortName], 1), calSb.formatStringFromName("tooNewSchemaErrorText", [shortName], 1), buttonFlags, calSb.formatStringFromName("tooNewSchemaButtonQuit", [shortName], 1), null, null, null, {value: false});  if (choice == 0) { var startup = Components.classes["@mozilla.org/toolkit/app-startup;1"] .getService(Components.interfaces.nsIAppStartup); startup.quit(Components.interfaces.nsIAppStartup.eForceQuit); } 
context:     initDB: function() {        var sqlTables = { cal_calendars: "id INTEGER PRIMARY KEY, type STRING, uri STRING",                          cal_calendars_prefs: "id INTEGER PRIMARY KEY, calendar INTEGER, name STRING, value STRING"        };        var dbService = Components.classes[kStorageServiceContractID].getService(kStorageServiceIID);	if ( "getProfileStorage" in dbService ) {	  // 1.8 branch	  this.mDB = dbService.getProfileStorage("profile");	} else {	  // trunk 	  this.mDB = dbService.openSpecialDatabase("profile");	}        for (table in sqlTables) {            try {                this.mDB.createTable(table, sqlTables[table]);            } catch (ex) {                dump("error creating table " + table + " -- probably already exists\n");            }        }        this.mSelectCalendars = createStatement (            this.mDB,            "SELECT oid,* FROM cal_calendars");        this.mFindCalendar = createStatement (            this.mDB,            "SELECT id FROM cal_calendars WHERE type = :type AND uri = :uri");        this.mRegisterCalendar = createStatement (            this.mDB,            "INSERT INTO cal_calendars (type, uri) " +            "VALUES (:type, :uri)"            );        this.mUnregisterCalendar = createStatement (            this.mDB,            "DELETE FROM cal_calendars WHERE id = :id"            );        this.mGetPref = createStatement (            this.mDB,            "SELECT value FROM cal_calendars_prefs WHERE calendar = :calendar AND name = :name");        this.mDeletePref = createStatement (            this.mDB,            "DELETE FROM cal_calendars_prefs WHERE calendar = :calendar AND name = :name");        this.mInsertPref = createStatement (            this.mDB,            "INSERT INTO cal_calendars_prefs (calendar, name, value) " +            "VALUES (:calendar, :name, :value)");        this.mDeletePrefs = createStatement (            this.mDB,            "DELETE FROM cal_calendars_prefs WHERE calendar = :calendar");    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c4b0b6be28f12a3417badf8b64d5ac0ab8796121/calCalendarManager.js/clean/calendar/base/src/calCalendarManager.js