protected static function get_data_row_update($node_schema, $node_table, $old_data_row_columns, $old_data_row, $new_data_row_columns, $new_data_row, $changed_columns)
 {
     if (count($changed_columns) == 0) {
         throw new exception("empty changed_columns passed");
     }
     // what columns from new_data_row are different in old_data_row?
     // those are the ones to push through the update statement to make the database current
     $old_columns = array();
     $update_columns = array();
     foreach ($changed_columns as $changed_column) {
         if (!isset($changed_column['old_col'])) {
             $old_columns[] = 'NOTDEFINED';
         } else {
             $old_col_value = format::column_value_default($node_schema, $node_table, $changed_column['name'], $changed_column['old_col']);
             $old_columns[] = $changed_column['name'] . ' = ' . $old_col_value;
         }
         $update_col_name = format::get_quoted_column_name($changed_column['name']);
         $update_col_value = format::column_value_default($node_schema, $node_table, $changed_column['name'], $changed_column['new_col']);
         $update_columns[] = $update_col_name . ' = ' . $update_col_value;
     }
     // if the computed update_columns expression is < 5 chars, complain
     // if ( strlen($update_columns) < 5 ) {
     //   var_dump($update_columns);
     //   throw new exception(sprintf("%s.%s update_columns is < 5 chars, unexpected", $node_schema['name'], $node_table['name']));
     // }
     $old_columns = implode(', ', $old_columns);
     $update_columns = implode(', ', $update_columns);
     // use multiline comments here, so when data has newlines they can be preserved, but upgrade scripts don't catch on fire
     $sql = sprintf("UPDATE %s SET %s WHERE (%s); /* old values: %s */\n", format::get_fully_qualified_table_name($node_schema['name'], $node_table['name']), $update_columns, dbx::primary_key_expression(dbsteward::$new_database, $node_schema, $node_table, $new_data_row_columns, $new_data_row), $old_columns);
     return $sql;
 }