Skip to content
  • Ryuta Kamizono's avatar
    4a0e3809
    Fix type casting column default in `change_column` · 4a0e3809
    Ryuta Kamizono authored
    Since #31230, `change_column` is executed as a bulk statement.
    
    That caused incorrect type casting column default by looking up the
    before changed type, not the after changed type.
    
    In a bulk statement, we can't use `change_column_default_for_alter` if
    the statement changes the column type.
    
    This fixes the type casting to use the constructed target sql_type.
    
    Fixes #34938.
    4a0e3809
    Fix type casting column default in `change_column`
    Ryuta Kamizono authored
    Since #31230, `change_column` is executed as a bulk statement.
    
    That caused incorrect type casting column default by looking up the
    before changed type, not the after changed type.
    
    In a bulk statement, we can't use `change_column_default_for_alter` if
    the statement changes the column type.
    
    This fixes the type casting to use the constructed target sql_type.
    
    Fixes #34938.
Loading