Database is not creating
This code is not working on angular 1.5v, no debug mode ?, no error log ?
$indexedDBProvider.connection('localDatabasex');.upgradeDatabase(1, function (event, db, tx) {
console.log(db);
//Create Objects -- CityMaster
var objStore = db.createObjectStore('citymaster', { keyPath: 'ssn' });
objStore.createIndex('cityid', 'int', { unique: false });
objStore.createIndex('cityname', 'cityname', { unique: false });
objStore.createIndex('statename', 'statename', { unique: false });
objStore.createIndex('customcity', 'customcity', { unique: false });
objStore.createIndex('Whenupdate', 'Whenupdate', { unique: false });
objStore.createIndex('recentcity', 'recentcity', { unique: false });
});
Have you ever tried increase the version number upgradeDatabase(2, ...)? I also have this bug. The version of DB not change when I change it in code.
Oh, @sheikhbarkat , I see that when the dababase has any action such as call objectStore(), it will check the version and do upgrade.
upgradeDatabase() just pass a callback function for using when upgrading, itself not do upgrade.
Hey
Thanks for reply.
You have given those steps, i done exactly but database is not created., i tried many times it won't work. may be Angular version issue i'm using v 1.5
Then i created database using normal java script code.
Thanks
Regards ,
On Sun, Apr 17, 2016 at 5:43 PM, Cosmos Pham [email protected] wrote:
Oh, @sheikhbarkat https://github.com/sheikhbarkat , I see that when the dababase has any action such as call objectStore(), it will check the version and do upgrade. upgradeDatabase() just pass a callback function for using when upgrading, itself not do upgrade.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/webcss/angular-indexedDB/issues/46#issuecomment-211007997