diff options
Diffstat (limited to 'Source/SPDatabaseRename.m')
-rw-r--r-- | Source/SPDatabaseRename.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m index 448b2690..26a983e5 100644 --- a/Source/SPDatabaseRename.m +++ b/Source/SPDatabaseRename.m @@ -63,7 +63,7 @@ } DLog(@"list of found tables of source db: %@", tables); - [self createDatabase:targetDatabaseName]; + BOOL success = [self createDatabase:targetDatabaseName]; SPTableCopy *dbActionTableCopy = [[SPTableCopy alloc] init]; [dbActionTableCopy setConnection:connection]; @@ -71,6 +71,8 @@ if ([dbActionTableCopy moveTable:currentTable from:sourceDatabaseName to:targetDatabaseName]) { + } else { + success = FALSE; } } tables = [connection listTablesFromDB:sourceDatabaseName]; @@ -83,6 +85,7 @@ @"delete database not empty error informative message"), sourceDatabaseName]); } + return success; } - (BOOL) createDatabase: (NSString *)newDatabaseName { |