Added database columns for keeping track of history offsets

pull/14/head
Sam Bosley 12 years ago
parent 1ccad4f613
commit 34db0fc9fd

@ -142,6 +142,10 @@ public final class TagData extends RemoteModel {
public static final LongProperty HISTORY_FETCH_DATE = new LongProperty(
TABLE, "historyFetch");
/** History has more*/
public static final IntegerProperty HISTORY_HAS_MORE = new IntegerProperty(
TABLE, "historyHasMore");
/** List of all properties for this model */
public static final Property<?>[] PROPERTIES = generateProperties(TagData.class);
@ -175,6 +179,7 @@ public final class TagData extends RemoteModel {
defaultValues.put(COMPLETION_DATE.name, 0);
defaultValues.put(DELETION_DATE.name, 0);
defaultValues.put(HISTORY_FETCH_DATE.name, 0);
defaultValues.put(HISTORY_HAS_MORE.name, 0);
defaultValues.put(THUMB.name, "");
defaultValues.put(LAST_ACTIVITY_DATE.name, 0);

@ -191,6 +191,10 @@ public final class Task extends RemoteModel {
public static final LongProperty HISTORY_FETCH_DATE = new LongProperty(
TABLE, "historyFetch");
/** History has more*/
public static final IntegerProperty HISTORY_HAS_MORE = new IntegerProperty(
TABLE, "historyHasMore");
/** List of all properties for this model */
public static final Property<?>[] PROPERTIES = generateProperties(Task.class);
@ -312,6 +316,7 @@ public final class Task extends RemoteModel {
defaultValues.put(IS_READONLY.name, 0);
defaultValues.put(CLASSIFICATION.name, "");
defaultValues.put(HISTORY_FETCH_DATE.name, 0);
defaultValues.put(HISTORY_HAS_MORE.name, 0);
defaultValues.put(LAST_SYNC.name, 0);
defaultValues.put(UUID.name, NO_UUID);

@ -350,6 +350,7 @@ public class Database extends AbstractDatabase {
}
case 28:
case 29:
case 30:
tryExecSQL("DROP TABLE " + History.TABLE.name);
tryExecSQL(createTableSql(visitor, TaskOutstanding.TABLE.name, TaskOutstanding.PROPERTIES));
tryExecSQL(createTableSql(visitor, TagOutstanding.TABLE.name, TagOutstanding.PROPERTIES));
@ -367,10 +368,12 @@ public class Database extends AbstractDatabase {
tryExecSQL(addColumnSql(Task.TABLE, Task.IS_READONLY, visitor, "0"));
tryExecSQL(addColumnSql(Task.TABLE, Task.CLASSIFICATION, visitor, null));
tryExecSQL(addColumnSql(Task.TABLE, Task.HISTORY_FETCH_DATE, visitor, null));
tryExecSQL(addColumnSql(Task.TABLE, Task.HISTORY_HAS_MORE, visitor, null));
tryExecSQL(addColumnSql(Task.TABLE, Task.ATTACHMENTS_PUSHED_AT, visitor, null));
tryExecSQL(addColumnSql(Task.TABLE, Task.USER_ACTIVITIES_PUSHED_AT, visitor, null));
tryExecSQL(addColumnSql(TagData.TABLE, TagData.PUSHED_AT, visitor, null));
tryExecSQL(addColumnSql(TagData.TABLE, TagData.HISTORY_FETCH_DATE, visitor, null));
tryExecSQL(addColumnSql(TagData.TABLE, TagData.HISTORY_HAS_MORE, visitor, null));
tryExecSQL(addColumnSql(TagData.TABLE, TagData.TASKS_PUSHED_AT, visitor, null));
tryExecSQL(addColumnSql(TagData.TABLE, TagData.METADATA_PUSHED_AT, visitor, null));
tryExecSQL(addColumnSql(TagData.TABLE, TagData.USER_ACTIVITIES_PUSHED_AT, visitor, null));

Loading…
Cancel
Save