-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Removed dbal:import CLI command #3241
Conversation
UPGRADE.md
Outdated
## BC BREAK: Removed dbal:import CLI command | ||
|
||
The `dbal:import` CLI command has been removed since it only worked with PDO-based drivers by relying on a non-documented behavior of the extension, and it was impossible to make it work with other drivers. | ||
Please use other database client applications for import, e.g. `mysql < data.sql`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to be annoying and say that including only MySQL looks biased. :P Can we add alternatives that are also obvious?
Please use other database client applications for import,
e.g. `mysql < data.sql`, `psql < data.sql`, `cat data.sql | sqlite3 my.db` or equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to figure out the ways to import SQL dumps on all supported platforms, but in general, the proposal is legit. If you can add some more examples from the top of your head, please do.
BTW, isn't cat data.sql | sqlite3 my.db
same as sqlite3 my.db < data.sql
but with an extra process for cat
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need all supported platforms, MySQL, MariaDB, PostgreSQL and SQLite is enough imho.
isn't
cat data.sql | sqlite3 my.db
same assqlite3 my.db < data.sql
Likely yes. :)
$ sqlite3 <<<'select 123'
123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need all supported platforms, MySQL, MariaDB, PostgreSQL and SQLite is enough imho.
Makes sense. I'll update the PR later.
$ sqlite3 <<<'select 123' 123
Speaking of which, isn't it a proper replacement for dbal:run-sql
? Yes, it should work across the platforms but in the entire Tools
namespace we have only two commands remaining: , dbal:import
dbal:run-sql
and dbal:reserved-words
.
The latter, based on some recently discovered issues (e.g. #3152) may become obsolete in 3.0 since on the one hand, keywords cannot be fully supported in DBAL, on the other ORM should just quote everything. The notion of which names are reserved shouldn't be relevant for an app developer.
8d8ac0e
to
311f6c4
Compare
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
Removed dbal:import CLI command
The details are in #3237 (comment).