Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DB2): Instance of DateTimeType cannot be converted to string #6313

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Platforms/DB2Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\SQL\Builder\DefaultSelectSQLBuilder;
use Doctrine\DBAL\SQL\Builder\SelectSQLBuilder;
use Doctrine\DBAL\Types\DateTimeType;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use Doctrine\Deprecations\Deprecation;
Expand Down Expand Up @@ -855,7 +856,7 @@
}

if (! empty($column['version'])) {
if ((string) $column['type'] !== 'DateTime') {
if ($column['type'] instanceof DateTimeType) {

Check warning on line 859 in src/Platforms/DB2Platform.php

View check run for this annotation

Codecov / codecov/patch

src/Platforms/DB2Platform.php#L859

Added line #L859 was not covered by tests
$column['default'] = '1';
}
}
Expand Down