File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -421,8 +421,10 @@ private static function initSchema(Connection $connection): void
421
421
$ connection ->exec ('CREATE TABLE `players` (
422
422
`id` INT UNSIGNED AUTO_INCREMENT NOT NULL,
423
423
`player_and_games` JSON NOT NULL,
424
- `names_virtual` VARCHAR(20) GENERATED ALWAYS AS (`player_and_games` ->> \'$.name \') NOT NULL COMMENT \'@Generated \',
425
- PRIMARY KEY (`id`)
424
+ `names_virtual` VARCHAR(20) GENERATED ALWAYS AS (`player_and_games` ->> \'$.name \') NOT NULL COMMENT \'@Generated \',
425
+ `animal_id` INT COMMENT \'@Generated \',
426
+ PRIMARY KEY (`id`),
427
+ FOREIGN KEY (animal_id) REFERENCES animal(id)
426
428
);
427
429
' );
428
430
}
Original file line number Diff line number Diff line change 92
92
use TheCodingMachine \TDBM \Utils \PathFinder \PathFinder ;
93
93
use TheCodingMachine \TDBM \Utils \TDBMDaoGenerator ;
94
94
use Symfony \Component \Process \Process ;
95
+ use function get_class ;
95
96
96
97
class TDBMDaoGeneratorTest extends TDBMAbstractServiceTest
97
98
{
@@ -2282,7 +2283,7 @@ public function testFindFromRawSQLOnInheritance(): void
2282
2283
2283
2284
public function testGeneratedColumnsAreNotPartOfTheConstructor (): void
2284
2285
{
2285
- if ($ this ->tdbmService ->getConnection ()->getDatabasePlatform () instanceof MySqlPlatform && ! self ::isMariaDb ($ this ->tdbmService ->getConnection ())) {
2286
+ if (! $ this ->tdbmService ->getConnection ()->getDatabasePlatform () instanceof MySqlPlatform || self ::isMariaDb ($ this ->tdbmService ->getConnection ())) {
2286
2287
$ this ->markTestSkipped ('ReadOnly column is only tested with MySQL ' );
2287
2288
}
2288
2289
@@ -2318,7 +2319,7 @@ public function testGeneratedColumnsAreNotPartOfTheConstructor(): void
2318
2319
2319
2320
public function testCanReadVirtualColumn (): void
2320
2321
{
2321
- if ($ this ->tdbmService ->getConnection ()->getDatabasePlatform () instanceof MySqlPlatform && ! self ::isMariaDb ($ this ->tdbmService ->getConnection ())) {
2322
+ if (! $ this ->tdbmService ->getConnection ()->getDatabasePlatform () instanceof MySqlPlatform || self ::isMariaDb ($ this ->tdbmService ->getConnection ())) {
2322
2323
$ this ->markTestSkipped ('ReadOnly column is only tested with MySQL ' );
2323
2324
}
2324
2325
You can’t perform that action at this time.
0 commit comments