Fixed brokenness on schema reinitialization
This commit is contained in:
parent
448fde9ff1
commit
882a96ee40
1 changed files with 5 additions and 5 deletions
|
@ -127,15 +127,15 @@ Scholar.Schema = new function(){
|
||||||
*/
|
*/
|
||||||
function _initializeSchema(){
|
function _initializeSchema(){
|
||||||
try {
|
try {
|
||||||
beginTransaction();
|
Scholar.DB.beginTransaction();
|
||||||
var sql = _getSchemaSQL();
|
var sql = _getSchemaSQL();
|
||||||
query(sql);
|
Scholar.DB.query(sql);
|
||||||
query("INSERT INTO version VALUES (" + _getSchemaSQLVersion() + ")");
|
Scholar.DB.query("INSERT INTO version VALUES (" + _getSchemaSQLVersion() + ")");
|
||||||
commitTransaction();
|
Scholar.DB.commitTransaction();
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
alert(e);
|
alert(e);
|
||||||
rollbackTransaction();
|
Scholar.DB.rollbackTransaction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue