Skip to content

Commit

Permalink
Reverse some changes that shouldn't have been changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Feb 13, 2024
1 parent 1e52320 commit a8ef0db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Sources/Db/APIs/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -1348,10 +1348,12 @@ public function calculate_type(string $type_name, ?int $type_size = null, bool $
if (!$reverse) {
$types = [
'inet' => 'varbinary',
'uuid' => 'binary',
];
} else {
$types = [
'varbinary' => 'inet',
'binary' => 'uuid',
];
}

Expand All @@ -1360,11 +1362,19 @@ public function calculate_type(string $type_name, ?int $type_size = null, bool $
if ($type_name == 'inet' && !$reverse) {
$type_size = 16;
$type_name = 'varbinary';
} elseif ($type_name == 'uuid' && !$reverse) {
$type_size = 16;
$type_name = 'binary';
} elseif ($type_name == 'varbinary' && $reverse && $type_size == 16) {
$type_name = 'inet';
$type_size = null;
} elseif ($type_name == 'binary' && $reverse && $type_size == 16) {
$type_name = 'uuid';
$type_size = null;
} elseif ($type_name == 'varbinary') {
$type_name = 'varbinary';
} elseif ($type_name == 'binary') {
$type_name = 'binary';
} else {
$type_name = $types[$type_name];
}
Expand Down Expand Up @@ -1629,8 +1639,6 @@ public function create_table(string $table_name, array $columns, array $indexes
],
);

return $result;

// Fill the old data
if ($old_table_exists) {
$same_col = [];
Expand Down

0 comments on commit a8ef0db

Please sign in to comment.