Split – Sync – Vaporize – Ouch

Viewing 1 reply thread
  • Author
    Posts
  • August 9, 2016 at 5:53 PM #18381

    JoeM
    Participant

    Yikes. I just spent hours recovering lost databases, so hopefully this helps someone else…

    I wanted to split my version 4 database into 2 separate version 5 database files. After importing my version 4 file, I clicked on the “right-arrow-in-a-circle” icon from the documents window and it took me to the actual database file. I duplicated that file and renamed the copy. The new file appeared in the documents window and I then happily went into each file and deleted the appropriate records so that I was left with two separate clean databases. All seemed great…

    DO NOT DO THIS!!!

    The problem is that both files retain the same database ID. So when you set up syncing with Cloudant, it thinks they are the same database, e.g. both local databases sync to the same Cloudant database. So once I synced the second database, it deleted all of the 1st database’s records (since I HAD deleted those records from the 2nd database), and then the first database deleted all the records from the 2nd database. So now both local databases have ZERO records in them. They wiped each other out!

    After manually deleting both database files, both from Cloudant and Tap Forms, I realized I needed to separately MIGRATE the original file twice, and then go through the whole thing again.

    This actually still wasn’t exactly right. Cloudant sees all the deletes. One of the two databases has about 10x more records than the other. So the 2nd database throws alerts in Cloudant since it has way more deleted records than actual records. It works, but the alerts were bothering me. So for the smaller database, I ended up going through a painful export at the record level and then importing into a fresh clean database. Which then happily synced to Cloudant.

    What a pain. At least it is all working now. Suggestion — don’t allow multiple files to have the same ID.

    Side note from the User Experience icon police… The “right-arrow-in-a-circle” icon on the database documents window (mentioned above) behaves the same way it does in version 4. It takes you to the actual file in the Finder. But within a record, the same icon is used, but with a different action. Since media/files are embedded in the database now, that same icon is used to mean EXPORT (e.g. save the attachment). One icon… Two behaviors…

    August 9, 2016 at 10:51 PM #18392

    Brendan
    Keymaster

    Hi Joe,

    An alternative is to use the new Export Tap Forms Archive command in the File menu.

    With that you’ll get a self-contained .tfarc file that contains the form definition, all the records, including all the photos, file attachments, etc. Then create a new document and use the Import Tap Forms Archive command. I wrote that code specifically for this purpose of being able to split up one big database into smaller databases.

    Thanks for the feedback on the icon. I should change it to a down arrow like I have for photos.

Viewing 1 reply thread

You must be logged in to reply to this topic.