Skip to content

Commit

Permalink
Merge pull request #6718 from albertlast/db_not_null
Browse files Browse the repository at this point in the history
Fixed boolean invert in not_null columns
  • Loading branch information
jdarwood007 committed Apr 28, 2021
2 parents 42204c5 + ec73f97 commit 98ba922
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/DbPackages-mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ function smf_db_change_column($table_name, $old_column, $column_info)

// backward compatibility
if (isset($column_info['null']))
$column_info['not_null'] != $column_info['null'];
$column_info['not_null'] = !$column_info['null'];
if (isset($old_info['null']))
$old_info['not_null'] != $old_info['null'];
$old_info['not_null'] = !$old_info['null'];
// Get the right bits.
if (!isset($column_info['name']))
$column_info['name'] = $old_column;
Expand Down
2 changes: 1 addition & 1 deletion Sources/DbPackages-postgresql.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ function smf_db_change_column($table_name, $old_column, $column_info)

// backward compatibility
if (isset($column_info['null']))
$column_info['not_null'] != $column_info['null'];
$column_info['not_null'] = !$column_info['null'];

// Check it does exist!
$columns = $smcFunc['db_list_columns']($table_name, true);
Expand Down

0 comments on commit 98ba922

Please sign in to comment.