Skip to content

Commit 0614a29

Browse files
committed
Merge branch '4.4.x' into 5.0.x
* 4.4.x: Prepare the 4.4.0 release (#7233) Change MySQL bool declaration from TINYINT(1) to TINYINT (#7221)
2 parents 1af0855 + e8c5163 commit 0614a29

File tree

4 files changed

+41
-12
lines changed

4 files changed

+41
-12
lines changed

.doctrine-project.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@
1111
"slug": "latest",
1212
"upcoming": true
1313
},
14+
{
15+
"name": "4.5",
16+
"branchName": "4.5.x",
17+
"slug": "4.5",
18+
"upcoming": true
19+
},
1420
{
1521
"name": "4.4",
1622
"branchName": "4.4.x",
1723
"slug": "4.4",
18-
"upcoming": true
24+
"current": true
1925
},
2026
{
2127
"name": "4.3",
2228
"branchName": "4.3.x",
2329
"slug": "4.3",
24-
"current": true
30+
"maintained": false
2531
},
2632
{
2733
"name": "4.2",

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Doctrine DBAL
22

3-
| [5.0-dev][5.0] | [4.4-dev][4.4] | [4.3][4.3] | [3.10][3.10] |
3+
| [5.0-dev][5.0] | [4.5-dev][4.5] | [4.4][4.4] | [3.10][3.10] |
44
|:---------------------------------------------------:|:---------------------------------------------------:|:---------------------------------------------------:|:-----------------------------------------------------:|
5-
| [![GitHub Actions][GA 5.0 image]][GA 5.0] | [![GitHub Actions][GA 4.4 image]][GA 4.4] | [![GitHub Actions][GA 4.3 image]][GA 4.3] | [![GitHub Actions][GA 3.10 image]][GA 3.10] |
6-
| [![Code Coverage][Coverage 5.0 image]][CodeCov 5.0] | [![Code Coverage][Coverage 4.4 image]][CodeCov 4.4] | [![Code Coverage][Coverage 4.3 image]][CodeCov 4.3] | [![Code Coverage][Coverage 3.10 image]][CodeCov 3.10] |
5+
| [![GitHub Actions][GA 5.0 image]][GA 5.0] | [![GitHub Actions][GA 4.5 image]][GA 4.5] | [![GitHub Actions][GA 4.4 image]][GA 4.4] | [![GitHub Actions][GA 3.10 image]][GA 3.10] |
6+
| [![Code Coverage][Coverage 5.0 image]][CodeCov 5.0] | [![Code Coverage][Coverage 4.5 image]][CodeCov 4.5] | [![Code Coverage][Coverage 4.4 image]][CodeCov 4.4] | [![Code Coverage][Coverage 3.10 image]][CodeCov 3.10] |
77

88
Powerful ***D***ata***B***ase ***A***bstraction ***L***ayer with many features for database schema introspection and schema management.
99

@@ -19,18 +19,18 @@ Powerful ***D***ata***B***ase ***A***bstraction ***L***ayer with many features f
1919
[GA 5.0]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A5.0.x
2020
[GA 5.0 image]: https://github.com/doctrine/dbal/actions/workflows/continuous-integration.yml/badge.svg?branch=5.0.x
2121

22+
[Coverage 4.5 image]: https://codecov.io/gh/doctrine/dbal/branch/4.5.x/graph/badge.svg
23+
[4.5]: https://github.com/doctrine/dbal/tree/4.5.x
24+
[CodeCov 4.5]: https://codecov.io/gh/doctrine/dbal/branch/4.5.x
25+
[GA 4.5]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.5.x
26+
[GA 4.5 image]: https://github.com/doctrine/dbal/actions/workflows/continuous-integration.yml/badge.svg?branch=4.5.x
27+
2228
[Coverage 4.4 image]: https://codecov.io/gh/doctrine/dbal/branch/4.4.x/graph/badge.svg
2329
[4.4]: https://github.com/doctrine/dbal/tree/4.4.x
2430
[CodeCov 4.4]: https://codecov.io/gh/doctrine/dbal/branch/4.4.x
2531
[GA 4.4]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.4.x
2632
[GA 4.4 image]: https://github.com/doctrine/dbal/actions/workflows/continuous-integration.yml/badge.svg?branch=4.4.x
2733

28-
[Coverage 4.3 image]: https://codecov.io/gh/doctrine/dbal/branch/4.3.x/graph/badge.svg
29-
[4.3]: https://github.com/doctrine/dbal/tree/4.3.x
30-
[CodeCov 4.3]: https://codecov.io/gh/doctrine/dbal/branch/4.3.x
31-
[GA 4.3]: https://github.com/doctrine/dbal/actions?query=workflow%3A%22Continuous+Integration%22+branch%3A4.3.x
32-
[GA 4.3 image]: https://github.com/doctrine/dbal/actions/workflows/continuous-integration.yml/badge.svg?branch=4.3.x
33-
3434
[Coverage 3.10 image]: https://codecov.io/gh/doctrine/dbal/branch/3.10.x/graph/badge.svg
3535
[3.10]: https://github.com/doctrine/dbal/tree/3.10.x
3636
[CodeCov 3.10]: https://codecov.io/gh/doctrine/dbal/branch/3.10.x

src/Platforms/AbstractMySQLPlatform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function getTimeTypeDeclarationSQL(array $column): string
180180
*/
181181
public function getBooleanTypeDeclarationSQL(array $column): string
182182
{
183-
return 'TINYINT(1)';
183+
return 'TINYINT';
184184
}
185185

186186
/**

tests/Functional/Schema/MySQLSchemaManagerTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,29 @@ public function testSchemaDiffWithCustomColumnTypeWhileDatabaseTypeDiffers(): vo
810810
);
811811
}
812812

813+
public function testMigrateOldBoolean(): void
814+
{
815+
$this->connection->executeStatement('DROP TABLE IF EXISTS table_with_old_boolean');
816+
$this->connection->executeStatement(
817+
'CREATE TABLE table_with_old_boolean (val TINYINT(1) NOT NULL)',
818+
);
819+
820+
$onlineTable = $this->schemaManager->introspectTableByUnquotedName('table_with_old_boolean');
821+
$targetTable = Table::editor()
822+
->setUnquotedName('table_with_old_boolean')
823+
->setColumns(
824+
Column::editor()
825+
->setUnquotedName('val')
826+
->setTypeName(Types::BOOLEAN)
827+
->create(),
828+
)
829+
->create();
830+
831+
$diff = $this->schemaManager->createComparator()->compareTables($onlineTable, $targetTable);
832+
833+
self::assertTrue($diff->isEmpty(), 'Tables should be identical.');
834+
}
835+
813836
public function getExpectedDefaultSchemaName(): ?string
814837
{
815838
return null;

0 commit comments

Comments
 (0)