Skip to content
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

Merged
merged 1 commit into from
Aug 8, 2018
Merged

Conversation

morozov
Copy link
Member

@morozov morozov commented Aug 7, 2018

Q A
BC Break yes
Fixed issues #3237

The details are in #3237 (comment).

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`.
Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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 as sqlite3 my.db < data.sql

Likely yes. :)

$ sqlite3 <<<'select 123'
123

Copy link
Member Author

@morozov morozov Aug 7, 2018

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.

@morozov morozov force-pushed the issues/3237 branch 2 times, most recently from 8d8ac0e to 311f6c4 Compare August 8, 2018 02:42
@morozov morozov merged commit 7963962 into doctrine:develop Aug 8, 2018
@morozov morozov deleted the issues/3237 branch August 8, 2018 16:06
morozov added a commit that referenced this pull request Sep 29, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Oct 7, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Oct 7, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Nov 14, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Nov 14, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Nov 25, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Dec 6, 2018
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Jan 20, 2019
Removed dbal:import CLI command
morozov added a commit to morozov/dbal that referenced this pull request Feb 6, 2019
morozov added a commit to morozov/dbal that referenced this pull request Feb 6, 2019
morozov added a commit that referenced this pull request Feb 7, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Feb 20, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Feb 22, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Mar 15, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Mar 15, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Mar 18, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Apr 16, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request May 6, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request May 23, 2019
Removed dbal:import CLI command
morozov added a commit to morozov/dbal that referenced this pull request May 31, 2019
morozov added a commit that referenced this pull request Jun 13, 2019
Removed dbal:import CLI command
morozov added a commit that referenced this pull request Jun 27, 2019
Removed dbal:import CLI command
morozov added a commit to morozov/dbal that referenced this pull request Aug 26, 2019
morozov added a commit that referenced this pull request Nov 2, 2019
Removed dbal:import CLI command
morozov added a commit to morozov/dbal that referenced this pull request Dec 30, 2019
@morozov morozov modified the milestones: 4.0.0, 3.0.0 Nov 17, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants