orm:schema-tool:create more friendly error when it's not able to create database file. #6179

Closed
opened 2026-01-22 15:28:22 +01:00 by admin · 1 comment
Owner

Originally created by @CViniciusSDias on GitHub (Feb 20, 2019).

Originally assigned to: @Ocramius on GitHub.

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

When we try to execute php vendor/bin/doctrine orm:schema-tool:create with an SQLite database configured to a path that doesn't exist, an error like this one is shown:

Error

It would be a lot easier to newcomers to figure out what's happening if the CLI informed that the directory where it's trying to create the database file doesn't exist.

Originally created by @CViniciusSDias on GitHub (Feb 20, 2019). Originally assigned to: @Ocramius on GitHub. ### Feature Request | Q | A |------------ | ------ | New Feature | yes | RFC | no | BC Break | no #### Summary When we try to execute `php vendor/bin/doctrine orm:schema-tool:create` with an SQLite database configured to a path that doesn't exist, an error like this one is shown: ![Error](https://uploaddeimagens.com.br/images/001/913/334/full/erro-doctrine.png) It would be a lot easier to newcomers to figure out what's happening if the CLI informed that the directory where it's trying to create the database file doesn't exist.
admin added the ImprovementCan't FixQuestion labels 2026-01-22 15:28:22 +01:00
admin closed this issue 2026-01-22 15:28:22 +01:00
Author
Owner

@Ocramius commented on GitHub (Feb 21, 2019):

@CViniciusSDias this is what the underlying SQLite layer is reporting to us: we don't check if the directory/path exists, nor if the file is writable, since that's a detail of Sqlite3 or PDO_Sqlite.

Please report this to https://bugs.php.net/ if you want to have the SQLite exception improved.

@Ocramius commented on GitHub (Feb 21, 2019): @CViniciusSDias this is what the underlying SQLite layer is reporting to us: we don't check if the directory/path exists, nor if the file is writable, since that's a detail of Sqlite3 or PDO_Sqlite. Please report this to https://bugs.php.net/ if you want to have the SQLite exception improved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6179