Titanium JIRA Archive
Alloy (ALOY)

[ALOY-641] Support remoteBackup for SQLite adapter

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-04-25T20:38:06.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 09
ComponentsRuntime, Titanium SDK
Labelsqe-testadded
ReporterTony Lukasavage
AssigneeTony Lukasavage
Created2013-04-25T20:02:52.000+0000
Updated2014-04-23T12:43:25.000+0000

Description

PR: https://github.com/appcelerator/alloy/pull/119 {quote} Proposed Patch to provide support for Ti.Filesystem.File.remoteBackup in Alloy's bult-in SQL adapter. I debated making the attribute a boolean but that created the issue of naming it noRemoteBackup or something similar. Instead I choose to stick with the existing property name, which I thought made more sense. Hence the "off" value to set the feature. However, smarter minds than mine can debate the name:value pair. I just want the feature support. {quote}

Comments

  1. Tony Lukasavage 2013-04-25

    PR: https://github.com/appcelerator/alloy/pull/119 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/models/sql_preload When functionally testing, ensure that from ios simulator that you receive the following DEBUG message in the console log: {quote} iCloud "do not backup" flag set for database "/myapp.sqlite" {quote}
  2. Federico Casali 2013-07-29

    Verified as working. Titanium SDK 3.1.2.v20130726192706 Alloy 1.2.0-alpha Appcelerator Studio 3.1.3.201307252418 CLI 3.1.2 Node 0.8.22 Closing.
  3. Stefan Schüller 2014-04-23

    What about when the sql connector creates a new DB when you don't specify a preload file? Aren't those DBs then backed up by iCloud or am I mistaken? Doesn't the current code just create the DB with name _alloy_ when "Ti.Database.open(dbName);" is called? Maybe in the setup (module.exports.beforeModelCreate) there should be a test if the DB exists and if not create it which would then allow me to set the option remoteBackup true|false.

JSON Source