Add space before replacements to avoid any issues with similar types

This commit is contained in:
mattbucci
2024-01-08 04:08:35 +00:00
parent 7471e353e9
commit 200dfaa0b2
2 changed files with 31 additions and 27 deletions

View File

@@ -3,9 +3,11 @@
class AlterTableSQLRewriter extends AbstractSQLRewriter class AlterTableSQLRewriter extends AbstractSQLRewriter
{ {
private $stringReplacements = [ private $stringReplacements = [
' bigint(40)' => ' bigint',
' bigint(20)' => ' bigint', ' bigint(20)' => ' bigint',
' bigint(10)' => ' int', ' bigint(10)' => ' int',
' int(11)' => ' int', ' int(11)' => ' int',
' int(10)' => ' int',
' tinytext' => ' text', ' tinytext' => ' text',
' mediumtext' => ' text', ' mediumtext' => ' text',
' longtext' => ' text', ' longtext' => ' text',

View File

@@ -3,9 +3,11 @@
class CreateTableSQLRewriter extends AbstractSQLRewriter class CreateTableSQLRewriter extends AbstractSQLRewriter
{ {
private $stringReplacements = [ private $stringReplacements = [
' bigint(40)' => ' bigint',
' bigint(20)' => ' bigint', ' bigint(20)' => ' bigint',
' bigint(10)' => ' int', ' bigint(10)' => ' int',
' int(11)' => ' int', ' int(11)' => ' int',
' int(10)' => ' int',
' int(1)' => ' smallint', ' int(1)' => ' smallint',
' tinytext' => ' text', ' tinytext' => ' text',
' mediumtext' => ' text', ' mediumtext' => ' text',