rem: var dbService = Components.classes[kStorageServiceContractID].getService(kStorageServiceIID);  if ( "getProfileStorage" in dbService ) {  this.mDB = dbService.getProfileStorage("profile"); } else {  this.mDB = dbService.openSpecialDatabase("profile"); } 
add:  var checkSchema = true; 
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: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/7882b2e377a65e9b4524d2361e254ba7402fd524/calCalendarManager.js/clean/calendar/base/src/calCalendarManager.js