mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Remove old DB cruft.
This commit is contained in:
parent
0a3991daba
commit
2ce8ee80d8
3 changed files with 0 additions and 30 deletions
|
@ -76,12 +76,6 @@ public class BlurDatabase extends SQLiteOpenHelper {
|
|||
DatabaseConstants.REPLY_USERID + TEXT +
|
||||
")";
|
||||
|
||||
private final String OFFLINE_UPDATE_SQL = "CREATE TABLE " + DatabaseConstants.UPDATE_TABLE + " (" +
|
||||
DatabaseConstants.UPDATE_ID + INTEGER + " PRIMARY KEY, " +
|
||||
DatabaseConstants.UPDATE_TYPE + INTEGER + ", " +
|
||||
DatabaseConstants.UPDATE_ARGUMENTS + TEXT +
|
||||
")";
|
||||
|
||||
private final String STORY_TABLES_COLS =
|
||||
DatabaseConstants.STORY_HASH + TEXT + ", " +
|
||||
DatabaseConstants.STORY_AUTHORS + TEXT + ", " +
|
||||
|
@ -153,7 +147,6 @@ public class BlurDatabase extends SQLiteOpenHelper {
|
|||
db.execSQL(SOCIALFEED_STORIES_SQL);
|
||||
db.execSQL(STARRED_STORIES_SQL);
|
||||
db.execSQL(STARRED_STORIES_COUNT_SQL);
|
||||
db.execSQL(OFFLINE_UPDATE_SQL);
|
||||
}
|
||||
|
||||
public void dropAndRecreateTables() {
|
||||
|
@ -171,7 +164,6 @@ public class BlurDatabase extends SQLiteOpenHelper {
|
|||
db.execSQL(drop + DatabaseConstants.SOCIALFEED_STORY_MAP_TABLE);
|
||||
db.execSQL(drop + DatabaseConstants.STARRED_STORIES_TABLE);
|
||||
db.execSQL(drop + DatabaseConstants.STARRED_STORY_COUNT_TABLE);
|
||||
db.execSQL(drop + DatabaseConstants.UPDATE_TABLE);
|
||||
|
||||
onCreate(db);
|
||||
|
||||
|
|
|
@ -59,11 +59,6 @@ public class DatabaseConstants {
|
|||
public static final String CLASSIFIER_KEY = "key";
|
||||
public static final String CLASSIFIER_VALUE = "value";
|
||||
|
||||
public static final String UPDATE_TABLE = "offline_updates";
|
||||
public static final String UPDATE_ID = BaseColumns._ID;
|
||||
public static final String UPDATE_TYPE = "update_type";
|
||||
public static final String UPDATE_ARGUMENTS = "update_argument";
|
||||
|
||||
public static final String USER_TABLE = "user_table";
|
||||
public static final String USER_USERID = BaseColumns._ID;
|
||||
public static final String USER_USERNAME = "username";
|
||||
|
@ -123,10 +118,6 @@ public class DatabaseConstants {
|
|||
public static final String SUM_NEUT = "sum_neutral";
|
||||
public static final String SUM_NEG = "sum_negative";
|
||||
|
||||
public static final String[] UPDATE_COLUMNS = {
|
||||
UPDATE_ID, UPDATE_TYPE, UPDATE_ARGUMENTS
|
||||
};
|
||||
|
||||
public static final String[] FEED_COLUMNS = {
|
||||
FEED_TABLE + "." + FEED_ACTIVE, FEED_TABLE + "." + FEED_ID, FEED_TABLE + "." + FEED_FAVICON_URL, FEED_TABLE + "." + FEED_TITLE, FEED_TABLE + "." + FEED_LINK, FEED_TABLE + "." + FEED_ADDRESS, FEED_TABLE + "." + FEED_SUBSCRIBERS, FEED_TABLE + "." + FEED_UPDATED_SECONDS, FEED_TABLE + "." + FEED_FAVICON_FADE, FEED_TABLE + "." + FEED_FAVICON_COLOR, FEED_TABLE + "." + FEED_FAVICON_BORDER, FEED_TABLE + "." + FEED_FAVICON_TEXT,
|
||||
FEED_TABLE + "." + FEED_FAVICON, FEED_TABLE + "." + FEED_POSITIVE_COUNT, FEED_TABLE + "." + FEED_NEUTRAL_COUNT, FEED_TABLE + "." + FEED_NEGATIVE_COUNT
|
||||
|
|
|
@ -28,7 +28,6 @@ public class FeedProvider extends ContentProvider {
|
|||
public static final String VERSION = "v1";
|
||||
|
||||
public static final Uri NEWSBLUR_URI = Uri.parse("content://" + AUTHORITY + "/" + VERSION);
|
||||
public static final Uri OFFLINE_URI = Uri.parse("content://" + AUTHORITY + "/" + VERSION + "/offline_updates/");
|
||||
public static final Uri SOCIAL_FEEDS_URI = Uri.parse("content://" + AUTHORITY + "/" + VERSION + "/social_feeds/");
|
||||
public static final Uri FEEDS_URI = Uri.parse("content://" + AUTHORITY + "/" + VERSION + "/feeds/");
|
||||
public static final Uri CLASSIFIER_URI = Uri.parse("content://" + AUTHORITY + "/" + VERSION + "/classifiers/");
|
||||
|
@ -61,7 +60,6 @@ public class FeedProvider extends ContentProvider {
|
|||
private static final int STORY_COMMENTS = 9;
|
||||
private static final int INDIVIDUAL_STORY = 10;
|
||||
private static final int FEED_COUNT = 11;
|
||||
private static final int OFFLINE_UPDATES = 12;
|
||||
private static final int SOCIALFEED_COUNT = 13;
|
||||
private static final int INDIVIDUAL_SOCIAL_FEED = 14;
|
||||
private static final int REPLIES = 15;
|
||||
|
@ -102,7 +100,6 @@ public class FeedProvider extends ContentProvider {
|
|||
uriMatcher.addURI(AUTHORITY, VERSION + "/feedfoldermap/*/", SPECIFIC_FEED_FOLDER_MAP);
|
||||
uriMatcher.addURI(AUTHORITY, VERSION + "/folders/", ALL_FOLDERS);
|
||||
uriMatcher.addURI(AUTHORITY, VERSION + "/folders/*/", INDIVIDUAL_FOLDER);
|
||||
uriMatcher.addURI(AUTHORITY, VERSION + "/offline_updates/", OFFLINE_UPDATES);
|
||||
uriMatcher.addURI(AUTHORITY, VERSION + "/users/", USERS);
|
||||
uriMatcher.addURI(AUTHORITY, VERSION + "/starred_stories/", STARRED_STORIES);
|
||||
uriMatcher.addURI(AUTHORITY, VERSION + "/starred_stories_count/", STARRED_STORIES_COUNT);
|
||||
|
@ -112,9 +109,6 @@ public class FeedProvider extends ContentProvider {
|
|||
public int delete(Uri uri, String selection, String[] selectionArgs) {
|
||||
final SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||
switch (uriMatcher.match(uri)) {
|
||||
case OFFLINE_UPDATES:
|
||||
return db.delete(DatabaseConstants.UPDATE_TABLE, selection, selectionArgs);
|
||||
|
||||
case ALL_SOCIAL_FEEDS:
|
||||
db.delete(DatabaseConstants.SOCIALFEED_TABLE, null, null);
|
||||
return 1;
|
||||
|
@ -296,11 +290,6 @@ public class FeedProvider extends ContentProvider {
|
|||
db.insertWithOnConflict(DatabaseConstants.STORY_TABLE, null, values, SQLiteDatabase.CONFLICT_REPLACE);
|
||||
break;
|
||||
|
||||
// Inserting a story
|
||||
case OFFLINE_UPDATES:
|
||||
db.insertWithOnConflict(DatabaseConstants.UPDATE_TABLE, null, values, SQLiteDatabase.CONFLICT_REPLACE);
|
||||
break;
|
||||
|
||||
case STARRED_STORIES:
|
||||
db.insertWithOnConflict(DatabaseConstants.STARRED_STORIES_TABLE, null, values, SQLiteDatabase.CONFLICT_REPLACE);
|
||||
break;
|
||||
|
@ -554,8 +543,6 @@ public class FeedProvider extends ContentProvider {
|
|||
folderBuilder.append(" ORDER BY ");
|
||||
folderBuilder.append(DatabaseConstants.FOLDER_TABLE + "." + DatabaseConstants.FOLDER_NAME + " COLLATE NOCASE");
|
||||
return db.rawQuery(folderBuilder.toString(), null);
|
||||
case OFFLINE_UPDATES:
|
||||
return db.query(DatabaseConstants.UPDATE_TABLE, null, null, null, null, null, null);
|
||||
case ALL_SOCIAL_FEEDS:
|
||||
return db.query(DatabaseConstants.SOCIALFEED_TABLE, null, selection, null, null, null, "UPPER(" + DatabaseConstants.SOCIAL_FEED_TITLE + ") ASC");
|
||||
case INDIVIDUAL_SOCIAL_FEED:
|
||||
|
|
Loading…
Add table
Reference in a new issue