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

[database:restore] #2174 Recreate database before importing the dump #3856

Closed

Conversation

Projects
None yet
3 participants
@marcelovani
Copy link
Member

commented Apr 4, 2018

This PR fixes the issue #2174
I don't think we need a --replace option. The DROP/CREATE needs to happen every time.

@marcelovani

This comment has been minimized.

Copy link
Member Author

commented Apr 4, 2018

This should also help #3097

@@ -36,8 +36,3 @@ services:
arguments: ['@database', '@date.formatter', '@entity_type.manager', '@string_translation']
tags:
- { name: drupal.command }

This comment has been minimized.

Copy link
@marcelovani

marcelovani Apr 5, 2018

Author Member

Moving the code to uninstall.services.yml to make it available before we have a site running

if (strpos($file, '.sql.gz') !== false) {
$catCommand = "gunzip -c %s | ";
} else {
$catCommand = "cat %s | ";
}
$commands = array();
if ($databaseConnection['driver'] == 'mysql') {

This comment has been minimized.

Copy link
@marcelovani

marcelovani Apr 5, 2018

Author Member

Drop (if exists) and Create database. This is necessary when installing the site from a dump.

@enzolutions

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

Thanks @marcelovani for your contribution, due to some conflicts @harold20 took it and reship in other PR #4037

enzolutions added a commit that referenced this pull request May 15, 2019

[database:restore] Fixed conflicts of #3856 PR (#4037)
* #2174 Make command available without a site installed

* #2174 Recreate database before importing the dump

* Fixing tabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.