Skip to content

Commit

Permalink
Add workaround for default reading problem with MariaDB (cf doctrine/…
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Jun 15, 2021
1 parent 90ce097 commit e781d55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/storage/subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ public function onSchemaColumnDefinition(SchemaColumnDefinitionEventArgs $args)
'default' => $column['default'] ?? null,
'notnull' => $column['null'] != 'YES',
];
if ($options['default'] == "'0001-01-01 00:00:00'") {
$options['default'] = '0001-01-01 00:00:00';
}

$args->preventDefault();
$args->setColumn(new Column($column['field'], Type::getType(datetime::TYPE), $options));
Expand Down

0 comments on commit e781d55

Please sign in to comment.