mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-25 15:55:57 +03:00
[GH-ISSUE #431] WebServiceEntity and SyncUrl seem to be identical #303
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alxndrsn on GitHub (Apr 8, 2016).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/431
There are two classes which look identical:
WebServiceEntityandSyncUrl. I suspect one of them is outdated, but they're both used in various different places in the codebase, so it's not clear if that's actually the case.@eyedol commented on GitHub (Apr 22, 2016):
@alxndrsn This is a technical debt. The database library uses the class name as the table name. I changed the class names when I was refactoring the code base. Later I discovered I had to maintain the old class name,
SyncUrlif I don't want to update the db. This will require writing more code. It needs revisiting. Perhaps for now note a comment inSyncUrlwhy it's name is so?@alxndrsn commented on GitHub (Apr 22, 2016):
If
SyncUrlhas to stay, would it be possible to removeWebServiceEntity?@eyedol commented on GitHub (Apr 22, 2016):
We can do that but it'll change the nomenclature all together. You can go for it though.
@alxndrsn commented on GitHub (Apr 22, 2016):
Looks like we could change the database table name in
BaseDatabaseHelper.onUpgrade(), and therefore get rid ofSyncUrl.@eyedol commented on GitHub (Apr 22, 2016):
@alxndrsn Yeah you can. You've to do the data migration. There is no decent migration tool for Android as far as I know. Mostly I write them manually. Say if you upgrade from the app from x.x.y to x.x.z, all the saved data has to move with it. Not sure if there is a
sqlquery to rename a table without having to create temp tables and move data around.@alxndrsn commented on GitHub (Apr 22, 2016):
Something like:
should do it: https://www.sqlite.org/lang_altertable.html
@eyedol commented on GitHub (Apr 23, 2016):
That should probably do the trick