Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2988] Database.remove + database.install updates the database after restart of the app in iOS

GitHub Issuen/a
Resolution Date2012-01-03T17:51:18.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
ReporterRene Pot
AssigneePaul Dowsett


When doing database.remove() the database is still available, but after restart the new one is available. As the install does only works once, the database does not update if the file does. Therefore I want to remove the database, and re-install it. This works on android, but not on iOS, but only after a restart of the app. I think this is therefore a bug. Code snippet:
var version = '3';
var DB = Ti.Database.install(Titanium.Filesystem.resourcesDirectory + 'db.sqlite','db');
var queryResult = DB.execute('SELECT value FROM config WHERE name = "version"');
if (queryResult.isValidRow() && queryResult.fieldByName('value') != version){
    var DB = Ti.Database.install(Titanium.Filesystem.resourcesDirectory + 'db.sqlite','db');


  1. Paul Dowsett 2011-11-10

    Thank you for raising this ticket. If you are able to provide all the information described in the [JIRA Ticket Checklist](http://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) guidelines, *in the correct fields and using the right format*, we will be able to escalate it to the core team. Thanks in advance.
  2. Paul Dowsett 2012-01-03

    DB.remove() is currently an Android-only feature. Please see TIMOB-6969, which requests an equivalent method. Thanks for bringing my attention to this. I'm closing this now.
  3. Shak Hossain 2013-12-28

JSON Source