[interchange] Prevent key-only inserts for new rows during import

Josh Lavin interchange-cvs at icdevgroup.org
Thu Jul 21 21:53:28 UTC 2016


commit cb8c9d53daa9f5fe7a2ee41422cd23d1b1faa06b
Author: Josh Lavin <jlavin at endpoint.com>
Date:   Thu Jul 21 14:51:01 2016 -0700

    Prevent key-only inserts for new rows during import
    
    Closes #103
    
    - The set_slice() later in import_fields will create the new records
      just fine.
    - Tested with MySQL by uploading a spreadsheet with new rows for a table
      with a foreign key.
    - Also tested with a table with an auto-incrementing key.

 code/UI_Tag/import_fields.coretag |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/code/UI_Tag/import_fields.coretag b/code/UI_Tag/import_fields.coretag
index 58dfbed..4783a74 100644
--- a/code/UI_Tag/import_fields.coretag
+++ b/code/UI_Tag/import_fields.coretag
@@ -406,7 +406,6 @@ EOF
 					$out .= "${tmsg}Blank key, no autonumber option, skipping.\n";
 					next;
 				}
-				$k = $db->set_row($k);
 				$out .= "${tmsg}Adding record '$k'.\n" if $verbose;
 				$addcount++;
 			}



More information about the interchange-cvs mailing list