Open CrawfordW opened 2 years ago
Hi! I'm maintaining this project as Danny is a bit busy, I think its very possible to do that
var open = indexedDB.open("MyDatabase", 1);
console.log(value);
// Create the schema
open.onupgradeneeded = function(e) {
console.log("Old Version: " + e.target.result.oldversion); //Undefined
console.log("New Version: " + e.target.result.newversion); //Undefined
var db = open.result;
var store = db.createObjectStore("Inspections", {keyPath: "id", autoIncrement: true});
var index = store.createIndex(key, key);
};
we could implement something like this, and return to localBase, something like
localBase.getVersion ?
Great work Danny! Makes using indexedDB very easy. But what about version control? Can you suggest a way to recognize that the DB version is not what the app version needs and make the necessary updates to the DB?