ushahidi / Ushahidi_Android

[Deprecated] Ushahidi Android app For Ushahidi V2.x.x. Working on V3.x.x at
https://github.com/ushahidi/platform-android/
GNU Lesser General Public License v3.0
202 stars 153 forks source link

possible incorrect category data #87

Closed ghost closed 11 years ago

ghost commented 11 years ago

The report_category table holds the category data for both pending & fetched reports.
The value for the report_category.report_id can be either:

if we have the following data:

table: incidents
_id | incident_id | pending
===========================
0   | 1           | 0              
1   | 0           | 1

table: report_category
category_id | report_id
=======================
1           | 1        
2           | 1 

Wouldn't the category data for both incidents be incorrect?

eyedol commented 11 years ago

Good catch. Good approach is to add the pending filed. That way we're always sure of manipulating the right data

table: report_category
category_id | report_id | pending
=====================================
1           | 1         | 0       
2           | 1         | 1

Updated Fix incident_id to Pending. That was what I meant to say actually