Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6784] iOS: Database - data not transferred when populated database migrated from Titanium's old database folder to Private Documents

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2011-12-20T09:59:41.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterMartijn Kooij
AssigneeStephen Tramer
Created2011-12-16T15:01:54.000+0000
Updated2017-03-22T21:22:06.000+0000

Description

As per TIMOB-6273 the decision was made to store all databases in "Private Documents" instead of "Application Support/Database". This change requires any existing database on devices to be moved from the "old" folder to the new location. The code and comments in this change indicate that it was intended to migrate the database, but multiple tests on both simulator and device show that the "old" database is not being copied, but the database is being installed in the new location Steps to reproduce:
//Resources/data.mydb.sqlite is a "model" database.
var db = Ti.Database.install('/data/mydb.sqlite','mydb');

Run once using an "old" (pre December 6th) and verify that "Application Support/database/mydb.sql" has been created.

Run once more using a new SDK and verify that the previously created database still exists, but a new database has been created in "Private Documents".

The Ti.Database.DB now points to the new database in Private Documents and the user can't access his/her data.

Comments

  1. Paul Dowsett 2011-12-20

    Martijn - thanks for raising this ticket. Would you explain whether you found a workaround that was successful?
  2. Stephen Tramer 2011-12-20

    This is a duplicate of an issue we've already resolved for 1.8.0.1 (and is being merged into 1.7.6 and master).
  3. Stephen Tramer 2011-12-20

    This is a duplicate of ticket TIMOB-6756.
  4. Lee Morris 2017-03-22

    Closing as duplicate with regards to the information provided elsewhere in this ticket.

JSON Source