Update README with more precise instructions

This commit is contained in:
benjamin melançon 2019-07-27 00:53:41 -04:00
parent 564ae7a79e
commit 9b922c640d

View file

@ -29,7 +29,7 @@ ddev . drush -y site:install minimal --existing-config
## Running the migration. ## Running the migration.
Put the D7 files in th following location: Put the D7 files in the following location:
``` ```
<Project Root>/d7/sites/default/files/ <Project Root>/d7/sites/default/files/
``` ```
@ -37,7 +37,23 @@ There is a reference to the `sites/default/files` in the database so that struct
The path in the `upgrade_d7_file.yml` migration file is different because this is executed inside the docker container so in the The path in the `upgrade_d7_file.yml` migration file is different because this is executed inside the docker container so in the
docker container the <Project Root> is: `/var/www/html/` but no need to re-create those folders in the host machine. docker container the <Project Root> is: `/var/www/html/` but no need to re-create those folders in the host machine.
Create a database called `drupal7` with the content of the old site, [check here how to create the database](https://stackoverflow.com/a/49785024/1943924) Create a database called `drupal7`:
Use `ddev describe` to see what the host and port are for your local environment, and use that in the first line here:
```
mysql --host=127.0.0.1 --port=32779 --user=root --password=root --database=db
CREATE DATABASE drupal7;
GRANT ALL ON drupal7.* to 'db'@'%' IDENTIFIED BY 'db';
```
Now `ctrl+c` out of there, and, again substituting the host and port for your own, import your file from whereever you placed and named your db SQL dump:
```
mysql --host=127.0.0.1 --port=32779 --user=root --password=root --database=drupal7 < data/db.sql`
```
(Per [instructions for creating another database in ddev](https://stackoverflow.com/a/49785024/1943924).)
Once the files are in the correct place and the database has been created we can run the following to run all the migrations: Once the files are in the correct place and the database has been created we can run the following to run all the migrations: