Atlassian Aug 16, 2016

Android Schemas for Mobile Development

Article Summary

Dan Lew from Atlassian reveals how Trello Android went from dropping the entire database on every schema change to implementing proper upgrades. The reason? They were secretly building offline mode.

For years, Trello Android took a nuclear approach to database upgrades: drop everything and repopulate from the server. This worked fine when the server was the single source of truth. But when the team started building offline functionality, they needed a real migration strategy that wouldn't lose unsynced data.

Key Takeaways

Critical Insight

A simple file-based schema upgrade strategy with three types of automated tests gives you confidence that database migrations won't lose offline user data.

The article includes pseudocode for the exact test structure Trello uses to catch migration bugs before they reach production.

Recent from Atlassian

Related Articles