Skip to content

Conversation

@piotr-cz
Copy link
Contributor

@piotr-cz piotr-cz commented Dec 10, 2024

Without this:

  $configArray['environments']['test'] = [
      'adapter'    => 'sqlite',
      'connection' => $pdo,
+     'name' => ':memory:',
  ];

I'm getting error: Undefined array key "name" in vendor/robmorgan/phinx/src/Phinx/Db/Adapter/SQLiteAdapter.php:207 here:

if ($options['name'] === self::MEMORY) {
return '';
}

as mentioned here:

... It is also important to pass the database name too, as Phinx requires this for certain methods such as hasTable():

and here:

... However remember to also pass the database name as Phinx cannot infer this from the PDO connection.

@MasterOdin MasterOdin merged commit fa2b585 into cakephp:0.x Dec 14, 2024
12 checks passed
@piotr-cz piotr-cz deleted the bugfix/set-db-name branch December 15, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants