Project

General

Profile

« Previous | Next » 

Revision 5380

sql_io.py: put_table(): Moved changing the table of the default value column from Resolving the default value column to Setting pkeys of missing rows, because the table change is only needed in this section

View differences:

lib/sql_io.py
682 682
                +strings.as_tt(strings.repr_no_u(default))
683 683
                +' does not exist in mapping, falling back to None', level=2.1)
684 684
            default = None
685
        else:
686
            default = sql_gen.remove_col_rename(default)
687
            if sql_gen.is_table_col(default):
688
                default = sql_gen.with_table(default, full_in_table)
685
        else: default = sql_gen.remove_col_rename(default)
689 686
    
690 687
    if missing_msg != None and default == None:
691 688
        warnings.warn(UserWarning(missing_msg))
......
735 732
    if not is_function: # is_function doesn't leave holes
736 733
        log_debug('Setting pkeys of missing rows to '
737 734
            +strings.as_tt(strings.urepr(default)))
735
        if sql_gen.is_table_col(default):
736
            default = sql_gen.with_table(default, full_in_table)
738 737
        missing_rows_joins = [full_in_table, sql_gen.Join(into,
739 738
            {in_pkey: sql_gen.join_same_not_null}, sql_gen.filter_out)]
740 739
            # must use join_same_not_null or query will take forever

Also available in: Unified diff