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

Adapt package for framework v2 #86

Merged
merged 6 commits into from Aug 4, 2018

Conversation

3 participants
@schlessera
Member

schlessera commented Aug 4, 2018

Fixes #85

schlessera and others added some commits Aug 4, 2018

@swissspidy

This comment has been minimized.

Contributor

swissspidy commented Aug 4, 2018

Getting the following error now when running the tests:

01. $ wp db import wordpress.sql
    
    ERROR 1067 (42000) at line 14 in file: 'wordpress.sql': Invalid default value for 'comment_date'
    cwd: /var/folders/c1/8bn4rqzx0h1f49bxgmrzk2hm0000gn/T/wp-cli-test-run-search-replace-export.feature.3-5b65b9e29de725.05330330/
    run time: 0.36528205871582
    exit status: 1
    In step `And I run `wp db import wordpress.sql`'.  # vendor/wp-cli/wp-cli-tests/features/steps/when.php:29
    From scenario `Search / replace export to STDOUT'. # features/search-replace-export.feature:3
    Of feature `Search / replace with file export'.

No idea how that got broken.

@wojsmol

This comment has been minimized.

Contributor

wojsmol commented Aug 4, 2018

missing wp db

@swissspidy

This comment has been minimized.

Contributor

swissspidy commented Aug 4, 2018

@wojsmol Nope, that's not it. Just tested. The format of the exported SQL file really seems to be off.

@swissspidy

This comment has been minimized.

Contributor

swissspidy commented Aug 4, 2018

It's probably because I run MySQL 8 locally, and apparently in strict mode:

mysql> SHOW VARIABLES LIKE 'sql_mode';
+---------------+-----------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value                                                                                                                 |
+---------------+-----------------------------------------------------------------------------------------------------------------------+
| sql_mode      | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+---------------+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

See https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html and https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime.

So this is more of a bug in WordPress's default db schema than in this command.

@schlessera schlessera added this to the 1.4.0 milestone Aug 4, 2018

@schlessera schlessera merged commit bc14fe6 into master Aug 4, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@schlessera schlessera deleted the adapt-for-v2 branch Aug 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment