fmdb 数据库升级-----增加表字段
//判断字段是否存在
-(void)addColumnToTable:(NSString *)tableName ColumnName:(NSString *)column{
if ((tableName == nil) || (column == nil))
{
return;
}
BOOL bExist = [db columnExists:column inTableWithName:tableName];
if (!bExist) {
NSString *sql = [NSString stringWithFormat:@"ALTER TABLE %@ ADD %@ text",tableName,column];
[db executeUpdate:sql];
}
}