Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
bing6 committed Oct 29, 2018
1 parent ca36c94 commit fae396b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Classes/FMDTContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ - (NSString *)getAlterTableSql:(FMDTSchemaTable *)ldts dbts:(NSString *)dbts
NSString * findStr = [dbts substringWithRange:NSMakeRange(s.location, e.location - s.location)];
for (FMDTSchemaField *entry in ldts.fields) {
// if (![findStr containsString:entry.name]) {
if ([findStr rangeOfString:[NSString stringWithFormat:@"`%@`", entry.name]].length == 0) {
if (!([findStr rangeOfString:[NSString stringWithFormat:@"`%@`", entry.name]].length > 0 ||
[findStr rangeOfString:[NSString stringWithFormat:@"[%@]", entry.name]].length > 0)) {
[text appendFormat:@"alter table [%@] add column [%@] %@;", ldts.tableName, entry.name, entry.type];
}
}
Expand Down
2 changes: 1 addition & 1 deletion FMDBDataTable.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Pod::Spec.new do |s|
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/bing6/FMDBDataTable.git", :tag => "2.2.2" }
s.source = { :git => "https://github.com/bing6/FMDBDataTable.git", :tag => "2.2.3" }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand Down
4 changes: 2 additions & 2 deletions FMDataTable/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.2.2</string>
<string>2.2.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.2.2</string>
<string>2.2.3</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down

0 comments on commit fae396b

Please sign in to comment.