File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -871,6 +871,29 @@ public function testSchemaDiffWithCustomColumnTypeWhileDatabaseTypeDiffers(): vo
871871 );
872872 }
873873
874+ public function testMigrateOldBoolean (): void
875+ {
876+ $ this ->connection ->executeStatement ('DROP TABLE IF EXISTS table_with_old_boolean ' );
877+ $ this ->connection ->executeStatement (
878+ 'CREATE TABLE table_with_old_boolean (val TINYINT(1) NOT NULL) ' ,
879+ );
880+
881+ $ onlineTable = $ this ->schemaManager ->introspectTableByUnquotedName ('table_with_old_boolean ' );
882+ $ targetTable = Table::editor ()
883+ ->setUnquotedName ('table_with_old_boolean ' )
884+ ->setColumns (
885+ Column::editor ()
886+ ->setUnquotedName ('val ' )
887+ ->setTypeName (Types::BOOLEAN )
888+ ->create (),
889+ )
890+ ->create ();
891+
892+ $ diff = $ this ->schemaManager ->createComparator ()->compareTables ($ onlineTable , $ targetTable );
893+
894+ self ::assertTrue ($ diff ->isEmpty (), 'Tables should be identical. ' );
895+ }
896+
874897 public function getExpectedDefaultSchemaName (): ?string
875898 {
876899 return null ;
You can’t perform that action at this time.
0 commit comments