In short with that framework you can create several migrations that each look as follows:
@interface CreateStudents : FmdbMigration
{
}
@end
@implementation CreateStudents
- (void)up {
[self createTable:@"students" withColumns:[NSArray arrayWithObjects:
[FmdbMigrationColumn columnWithColumnName:@"first_name" columnType:@"string"],
[FmdbMigrationColumn columnWithColumnName:@"age" columnType:@"integer" defaultValue:21],
nil];
}
- (void)down {
[self dropTable:@"students"];
}
@end
That way the next time the application is updated the migration required to bring your application uptodate will be run. Cool. Note only can you add and remove columns but you can also run Objective-C code that will adapt the existing data to the required format for the new version.
Now I've gotta play with that framework.
Thanks guys for sharing this!
I decided to go with the iPhone FGB Scorecard.He had two or three things that I liked a little better about it during touchSQL.The biggest is that it is cached.
iPhone development companies
bency
August 9, 2010 11:26 PM