Postpone check for first account until adding an account
As the "first account"-check was right in the constructor, it was
carried out before checking whether or not a database schema update is
necessary.
This approach caused problems when a schema update is necessary on one
of the dependent tables (e.g.: adding a column to
AccountGeneralPreferences). There, since the "first account"-check
itself relies on being able to fetch an account, a "fetch failure on
accounts" OrmException gets thrown instead of issuing a hint to
upgrade the database schema.
We now postpone the check until an Account is created. Thereby, the
setting above correctly informs about the necessary schema update.
Change-Id: I031af8785dff1b2867d8a4bfb91d7596e6463491
1 file changed