config-command icon indicating copy to clipboard operation
config-command copied to clipboard

SQLite Compatibility

Open swissspidy opened this issue 2 years ago • 1 comments

When I manually run the tests locally with SQLite, the following scenario is failing:

001 Scenario: No wp-config.php  # features/config-create.feature:3
When I run `wp db create` # features/config-create.feature:60
$ wp db create

ERROR 1007 (HY000) at line 1: Can't create database 'wp_cli_test'; database exists

The way the SQLite db is set up for the tests, the error message when trying to run wp db create makes sense.

Possible options:

  • See if this can be resolved via a change to the db command
  • Make this scenario MySQL-only and add another, SQLite-only scenario that doesn't have the wp db create step.

swissspidy avatar Oct 21 '23 14:10 swissspidy

I think also something that could be fixed for general SQLite use:

wp config create --skip-check
Error: Parameter errors:
 missing --dbname parameter (Set the database name.)
 missing --dbuser parameter (Set the database user.)

These are set in tests so it is OK -- but SQLite does not need them so maybe it can check for SQLite and not require those. Right now you couldn't install WordPress with SQLite only without having to specify a dbname and dbuser that won't get used

mrsdizzie avatar Oct 25 '23 19:10 mrsdizzie