theexidge / routinger

Routinger is a task scheduler app that is made to make you a better person at no extra cost. The code is open-source. Dart language and Flutter framework are used extensively.
GNU Affero General Public License v3.0
28 stars 22 forks source link

The app is using 4 different databases, instead it should use only one main database and 4 tables. #4

Closed Kushalrock closed 2 years ago

Kushalrock commented 2 years ago

Is your feature request related to a problem? Please describe. Nope. But it can optimize the performance of the app.

Describe the solution you'd like Instead of using four databases with different names. A single Routinger database can be used in place of it and use four different tables to manage the data.

Describe alternatives you've considered No alternatives considered

Additional context The changes are to be made in the /lib/helper/db_helper.dart. Instead of using four databases, we can use single database and 4 different tables to optimize the performance of the app. Screenshot (3)

RepeaterCreeper commented 2 years ago

Hello, this would be my first contribution. I was just wonder if I could take a stab at this for Hacktoberfest? Would I need to wait until it starts? Thank you!

Kushalrock commented 2 years ago

Yes, surely, you can try it. I am assigning this to you. Unfortunately, if you want this to be counted towards hacktoberfest, wait to make the pull request till 1st October. You can fork the repo now do the required changes and then make a pull request on 1st October. That will save you a lot of time too.

Kushalrock commented 2 years ago

@RepeaterCreeper You may need to wipe out your android emulator data and install the app yet again before building it and working on it. Because I have made some database changes which will generate errors if you don't do a fresh install or delete the saved data on the device

RepeaterCreeper commented 2 years ago

@RepeaterCreeper You may need to wipe out your android emulator data and install the app yet again before building it and working on it. Because I have made some database changes which will generate errors if you don't do a fresh install or delete the saved data on the device

Awesome. I'll keep that in mind.

Kushalrock commented 2 years ago

Great.

RepeaterCreeper commented 2 years ago

Hey! So I was able to make it so it only uses 1 database with 4 tables. However I did notice an error that was popping up in my console about this: image

At first I thought I broke something, so I reverted to the original codebase and it was providing the same error. I googled it and it wasn't providing me much help aside from a SO answer saying I needed to add something to the MainActivity.

Kushalrock commented 2 years ago

The thing is SQFLite package used for database handling in this app isn't yet supported in web versions of flutter. So you need to run the app in an android or iOS emulator.

RepeaterCreeper commented 2 years ago

The thing is SQFLite package used for database handling in this app isn't yet supported in web versions of flutter. So you need to run the app in an android or iOS emulator.

Thank you! I got it fixed, I'll make the PR in October.

Kushalrock commented 2 years ago

@RepeaterCreeper Please fetch upstream before submitting a PR and resolve conflicts. Also, if you have done it, please can you make a PR? We have to make some changes to the database. But if we do that now, it will show conflicts with your branch. We don't want that. Therefore, we have put a hold on it.

But we can't hold it for much longer.

Thank you

RepeaterCreeper commented 2 years ago

@RepeaterCreeper Please fetch upstream before submitting a PR and resolve conflicts. Also, if you have done it, please can you make a PR? We have to make some changes to the database. But if we do that now, it will show conflicts with your branch. We don't want that. Therefore, we have put a hold on it.

But we can't hold it for much longer.

Thank you

Alright, I'll do that.