jgaa / f-crm

Customer Relations Management for Freelancers and Individual Contractors.
GNU General Public License v3.0
28 stars 7 forks source link

Let the user re-initialize the application if initialization fails at start-up #3

Open nafergo opened 5 years ago

nafergo commented 5 years ago

If the database is not valid, not found (examples: changed the database name; moved the binary to another computer with another home/username; etc) the software won't start. My suggestion: if f-crm can't find valid database in the settings path, then create an empty database in the default location. I noticed this because was experimenting with database location in a mega/dropbox storage account :) that way I can work from desktop and laptop easily :)

jgaa commented 5 years ago

I'll check it. Thank you.

jgaa commented 5 years ago

I have checked the code. The application is supposed to create the database if it don't exists, and that works for me when I test it.

If it fails to load the database, or fails to get the database schema version from the database, then it bails out. This is the intended behavior.

nafergo commented 5 years ago

But if it won't even start, how can I access settings and change the database path?

jgaa commented 5 years ago

I will make a fall-back so that if initialization fails, it will ask you f you want to re-initialize the application settings and the database. (I know how frustrating it is when an application behaves like this.)

What operating system are you using?

nafergo commented 5 years ago

Using Ubuntu 18.04

jgaa commented 5 years ago

Thank you.