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

[PR] Workaround for non-null default dates on MariaDB #83

Closed
fixpunkt opened this issue Sep 13, 2018 · 2 comments
Closed

[PR] Workaround for non-null default dates on MariaDB #83

fixpunkt opened this issue Sep 13, 2018 · 2 comments
Labels
bug Issues that describe an unexpected behaviour in an existing functionality. minor "bug" issues that are neither "critical" nor "major".

Comments

@fixpunkt
Copy link
Member

We've just seen another case which seems related to shopware/shopware#1396. The difference is that there's a DATE column with an actual non-null default where the default in information_schema.COLUMNS is enclosed in single-quotes as opposed to no quotes for proper MySQL.

This causes this attribute constructor code to be generated for \Shopware\Models\Attribute\Order:

public function __construct()
{
    $this->viisonLastChanged = new \DateTime("'2000-01-01 00:00:00'");
    $this->viisonPosTransactionType = "'order'";
}

This causes the \DateTime constructor to throw an exception. The customer was on 10.2.17-MariaDB-10.2.17+maria~stretch. We need to check whether this issue is also present in MariaDB 10.2.7, which was the version which introduced the previous bug.

We need to make another PR which works around this MariaDB compatibility problem (or convince everyone to drop MariaDB support...).

@fixpunkt fixpunkt added bug Issues that describe an unexpected behaviour in an existing functionality. minor "bug" issues that are neither "critical" nor "major". labels Sep 13, 2018
@shyim
Copy link

shyim commented Sep 16, 2018

Already fixed shopware/shopware@f58a0d9

@fixpunkt
Copy link
Member Author

Awesome, and thanks for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that describe an unexpected behaviour in an existing functionality. minor "bug" issues that are neither "critical" nor "major".
Projects
None yet
Development

No branches or pull requests

2 participants