Skip to content

Commit d97314f

Browse files
Regenerate README file (#337)
1 parent 5a5ca88 commit d97314f

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ wp db cli [--database=<database>] [--default-character-set=<character-set>] [--d
338338
Executes a SQL query against the database.
339339

340340
~~~
341-
wp db query [<sql>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults]
341+
wp db query [<sql>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--defaults] [--skip-sql-mode-compat]
342342
~~~
343343

344344
Executes an arbitrary SQL query using `DB_HOST`, `DB_NAME`, `DB_USER`
@@ -365,6 +365,13 @@ entirely.
365365
[--defaults]
366366
Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
367367

368+
[--skip-sql-mode-compat]
369+
Run the query under the server's own SQL modes instead of adapting them to
370+
be WordPress-compatible. By default, the incompatible modes that WordPress
371+
disables in `wpdb` (such as `NO_ZERO_DATE` and `STRICT_TRANS_TABLES`) are
372+
stripped for the session, so statements against WordPress's zero-date schema
373+
behave the same as they do in WordPress itself.
374+
368375
**EXAMPLES**
369376

370377
# Execute a query stored in a file
@@ -523,7 +530,7 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and
523530
Imports a database from a file or from STDIN.
524531

525532
~~~
526-
wp db import [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--skip-optimization] [--defaults]
533+
wp db import [<file>] [--dbuser=<value>] [--dbpass=<value>] [--<field>=<value>] [--skip-optimization] [--skip-sql-mode-compat] [--defaults]
527534
~~~
528535

529536
Runs SQL queries using `DB_HOST`, `DB_NAME`, `DB_USER` and
@@ -548,6 +555,9 @@ defined in the SQL.
548555
[--skip-optimization]
549556
When using an SQL file, do not include speed optimization such as disabling auto-commit and key checks.
550557

558+
[--skip-sql-mode-compat]
559+
Do not adapt the session SQL mode for WordPress compatibility. By default, `wp db import` strips the SQL modes that WordPress Core disables (such as `STRICT_TRANS_TABLES` and `NO_ZERO_DATE`) so that dumps containing legacy values like `0000-00-00` import cleanly. Pass this flag to import under the server's own SQL modes instead.
560+
551561
[--defaults]
552562
Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
553563

0 commit comments

Comments
 (0)