-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database Structure: Why 3 databases? #114
Comments
No reason other than that's how I started doing it. It at least made things more organized once the notes database was used, to separate all the note entries. |
I think I remember why I separated them... I sometimes would ask to see the configuration database when someone experienced an error and I didn't want their user credentials. It was also handy to be able to swap notes databases and if I wanted to save backups and individually look at them later. |
Ahh I think I see. There may be a better way to do reporting so that you can get the best of both worlds. There are a ton of issues that get solved when these models get placed into one database. I could see a few possible ways to solve the user data issue without having them send the whole database file. Having really good logging files would be a great start. I noticed that not all of the functions are logging yet. A base configuration could be dumped on a crash or a user could run a script to scrape the diagnostic data from the database while ignoring any personal info. |
Here is a sneak peak at one of the changes I've been working on. I won't do a pull request until it is completely ready but there are some things to look at. Early Tour of New StructureThese changes are moving towards making it easy to apply changes in the future. There is an effort to make the code base more DRY and well tested. Testing is the primary focus here. The current structure is very difficult to test because of how it sets itself up. The following changes make easy testing possible:
Take a look at how the init_db() takes a configuration object and uses those values to setup the environment. This gives you the ability to create Test Configuration conditions (like in-memory databases) during tests while providing Production Configurations |
This looks great. I don't completely understand how it all works, but I'm sure with time and use, it will come together for me. |
What was were the reasons behind creating 3 different databases?
Is there a reason that this app can't use a single database with multiple tables?
The text was updated successfully, but these errors were encountered: