diff --git a/docs/sync.md b/docs/sync.md index 048d1ab..3db113c 100644 --- a/docs/sync.md +++ b/docs/sync.md @@ -57,6 +57,17 @@ lando pull --auth "$PANTHEON_MACHINE_TOKEN" --database=none --rsync --verbose, -v Runs with extra verbosity ``` +::: warning Table Prefixes +Pantheon explicitly does not support table prefixes for [Drupal](https://docs.pantheon.io/guides/php/settings-php#are-table-prefixes-supported) or [Wordpress](https://docs.pantheon.io/wordpress-known-issues#table-prefixes). If you've ended up with table prefixes (you scoundrel), `lando pull` will fail with the error `Couldn't find expected tables ()` because it will not be able to detect your users table for the post-pull health check. The database contents will have been transferred, but things that should happen after that ("the ole post-migration search-replace on WordPress", pulling files) will not happen. To fix this, set `LANDO_DB_USER_TABLE` to the correct user table name in your env. For example, for prefix `xyz_`: +```yml +tooling: + pull: + env: + LANDO_DB_USER_TABLE: xyz_users +``` +::: + + Please consult the manual import documentation below if this command produces an error. #### Manually Importing Your DB and Files @@ -150,4 +161,4 @@ lando push --auth "$PANTHEON_MACHINE_TOKEN" --database=none --help Shows lando or delegated command help if applicable --message, -m A message describing your change --verbose, -v Runs with extra verbosity -``` \ No newline at end of file +``` diff --git a/scripts/pull.sh b/scripts/pull.sh index b6dee3b..f1d145d 100755 --- a/scripts/pull.sh +++ b/scripts/pull.sh @@ -163,7 +163,7 @@ EOF PULL_DB_CHECK_TABLE=${LANDO_DB_USER_TABLE:-users} lando_pink "Checking db pull for expected tables..." if ! mysql --user=pantheon --password=pantheon --database=pantheon --host=database --port=3306 -e "SHOW TABLES;" | grep $PULL_DB_CHECK_TABLE; then - lando_red "Database pull failed... " + lando_red "Couldn't find expected tables ($PULL_DB_CHECK_TABLE)" exit 1 fi