-
Notifications
You must be signed in to change notification settings - Fork 654
Offline support for center creation #712
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
Conversation
1089484 to
1b93df5
Compare
|
@therajanmaurya @puneetkohli521 Please review it. |
| public static class ViewHolder extends RecyclerView.ViewHolder { | ||
|
|
||
| @BindView(R.id.tv_db_name) | ||
| TextView tv_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mayank-kgp Please follow naming convention.s
This should be like tvName
| public final String LOG_TAG = getClass().getSimpleName(); | ||
|
|
||
| @BindView(R.id.rv_sync_payload) | ||
| RecyclerView rv_payload_center; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow naming convention, rvPayloadCenter and change other variables too.
|
@therajanmaurya Changes made. |
| * Created by nellyk on 1/22/2016. | ||
| */ | ||
| public class CenterPayload { | ||
| @Table(database = MifosDatabase.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mayank-kgp We already published the app on play store, so you have to migrate database while creating new table in the database.
Here is guide of DBFlow migration database https://github.com/agrosner/DBFlowDocs/tree/99495e3566e38785870f6c580caa3915709f8d1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@therajanmaurya When I was running the app, it crashed as you said earlier because previous database was already there. Then I found solution of increasing version number in
mifosng-android/src/main/java/com/mifos/api/local/MifosDatabase.java
After that is was working fine.
You can also see this comment -
agrosner/DBFlow#1059 (comment)
I think that we don't need to add any migration code because we are not adding new column in the existing table. We are adding a completley new table. So increasing the version number should work as it worked in my case.
Please correct me if I am wrong.

Please make sure these boxes are checked before submitting your pull request - thanks!
Apply the
MifosStyle.xmlstyle template to your code in Android Studio.Run the unit tests with
./gradlew checkto make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.
#711