aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseCopy.m
diff options
context:
space:
mode:
authordmoagx <post@wickenrode.com>2011-07-06 18:47:44 +0000
committerdmoagx <post@wickenrode.com>2011-07-06 18:47:44 +0000
commit4b071f5866460dbff1bce10a297f3b017dfea26b (patch)
tree23b84a5303e7a6e53f5326ded76e341d9ece888b /Source/SPDatabaseCopy.m
parentd86a86be46ecd2912171d1532e24a4a49afe0f5c (diff)
downloadsequelpro-4b071f5866460dbff1bce10a297f3b017dfea26b.tar.gz
sequelpro-4b071f5866460dbff1bce10a297f3b017dfea26b.tar.bz2
sequelpro-4b071f5866460dbff1bce10a297f3b017dfea26b.zip
* Fixes a spacing issue in Duplicate DB Sheet
* Fixes a case were for string == NULL was checked instead of [string length] == 0 (fixes #1103) * Fixes a logic error while copying databases and adds ability to copy InnoDB tables with foreign key checks (fixes #1111)
Diffstat (limited to 'Source/SPDatabaseCopy.m')
-rw-r--r--Source/SPDatabaseCopy.m14
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/SPDatabaseCopy.m b/Source/SPDatabaseCopy.m
index 66b6ba1b..c2371f3d 100644
--- a/Source/SPDatabaseCopy.m
+++ b/Source/SPDatabaseCopy.m
@@ -64,21 +64,15 @@
return NO;
}
- BOOL success = [self createDatabase:targetDatabaseName];
+ //abort here if database creation failed
+ if(![self createDatabase:targetDatabaseName])
+ return NO;
SPTableCopy *dbActionTableCopy = [[SPTableCopy alloc] init];
[dbActionTableCopy setConnection:connection];
- for (NSString *currentTable in tables) {
- if ([dbActionTableCopy copyTable:currentTable
- from:sourceDatabaseName
- to:targetDatabaseName
- withContent:copyWithContent]) {
- } else {
- success = NO;
- }
- }
+ BOOL success = [dbActionTableCopy copyTables:tables from:sourceDatabaseName to:targetDatabaseName withContent:copyWithContent];
[dbActionTableCopy release];