Skip to content

Commit

Permalink
Correct feeds & migrate database to version 25
Browse files Browse the repository at this point in the history
Correct feeds with creation date of 1.1.1970
  • Loading branch information
barijaona committed Dec 9, 2024
1 parent 97ec237 commit c79adaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Vienna/Sources/Database/Database+Migration.m
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,13 @@ + (void)migrateDatabase:(FMDatabase *)database
database.userVersion = (uint32_t)23;
NSLog(@"Updated database schema to version 23.");
}
case 24: {
case 24:
case 25: {
//correct articles that were saved with updatedDate is 1.1.1970 00:00
[database executeStatements:@"UPDATE messages SET date = createddate WHERE date = 0"];

database.userVersion = (uint32_t)24;
NSLog(@"Updated database schema to version 24.");
database.userVersion = (uint32_t)25;
NSLog(@"Updated database schema to version 25.");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Vienna/Sources/Database/Database.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ + (NSString *)databasePath;

// The current database version number
static NSInteger const VNAMinimumSupportedDatabaseVersion = 12;
static NSInteger const VNACurrentDatabaseVersion = 24;
static NSInteger const VNACurrentDatabaseVersion = 25;

@implementation Database

Expand Down

0 comments on commit c79adaa

Please sign in to comment.