I’m going to send an update from my app to the playstore and would like it to create the tables if they were modified (added some field)
this.storage = new SQLite();
this.storage.openDatabase({name: "infosysDB.db", location: "default"})
.then(
(data) => {
this.storage.executeSql("CREATE TABLE IF NOT EXISTS configDB(id INTEGER PRIMARY KEY AUTOINCREMENT, descricao VARCHAR, loja VARCHAR, servidor VARCHAR, token VARCHAR, itens VARCHAR, buscapadrao VARCHAR, power VARCHAR)", {})
.then(
(data) => {
console.log("tabela criada com sucesso");
},
(error) => {
this.presentToast(JSON.stringify(error));
})
},
(error) => {
this.presentToast("Erro ao abrir banco de dados " + error);
});