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

'drush si --db-prefix ...' to add table prefixes ignored; install is complete, but missing prefixes #6173

Closed
pgnd opened this issue Nov 28, 2024 · 0 comments

Comments

@pgnd
Copy link

pgnd commented Nov 28, 2024

with

drush core:status
	Drupal version : 11.0.9
	Site URI       : http://default
	PHP binary     : /usr/bin/php
	PHP config     : /usr/local/etc/php8/php.ini
	PHP OS         : Linux
	PHP version    : 8.4.1
	Drush script   : /srv/drupal.app/vendor/bin/drush.php
	Drush version  : 13.3.3.0
	Drush temp     : /tmp
	Drush configs  : /srv/drupal.app/vendor/drush/drush/drush.yml
	Drupal root    : /srv/drupal.app/web
	Site path      : sites/default

not yet installed,

mariadb-show ${D11_DB_NAME}
	Wildcard: db_drupal
	+-----------+
	| Databases |
	+-----------+
	+-----------+

exec of drush si with

drush site-install --help | grep -i "db-prefix"
	--db-prefix=DB-PREFIX         An optional table prefix to use for initial install.

echo "${D11_DB_URL}"
	mysql://drupal_user:[email protected]:12345/db_drupal

echo "${D11_DB_PREFIX}"
	pfx_

drush -vvv site-install standard -y \
 --db-su=${DB_SU_USR} \
 --db-su-pw=${DB_SU_PW} \
 --site-name="${D11_SITE_NAME}" \
 --sites-subdir="${D11_SITE_NAME_LC}" \
 --db-url="${D11_DB_URL}" \
 --db-prefix="${D11_DB_PREFIX}" \
  --site-mail="${D11_SITE_EMAIL}" \
  --account-mail="${D11_ADMIN_EMAIL}" \
  --account-name=${D11_ADMIN_USR} \
  --account-pass=${D11_ADMIN_USR} \
  --locale=en \
  install_configure_form.enable_update_status_emails=NULL

completes,

...
 [success] Installation complete. [26.62 sec, 46.96 MB]

but

mariadb-show ${D11_DB_NAME}
	Database: db_drupal
	+----------------------------------+
	|              Tables              |
	+----------------------------------+
	| block_content                    |
	| block_content__body              |
	| block_content_field_data         |
	| block_content_field_revision     |
	| block_content_revision           |
	| block_content_revision__body     |
	| comment                          |
	| comment__comment_body            |
	| comment_entity_statistics        |
	| comment_field_data               |
	| config                           |
	| file_managed                     |
	| file_usage                       |
	| help_search_items                |
	| history                          |
	| key_value                        |
	| menu_link_content                |
	| menu_link_content_data           |
	| menu_link_content_field_revision |
	| menu_link_content_revision       |
	| menu_tree                        |
	| node                             |
	| node__body                       |
	| node__comment                    |
	| node__field_image                |
	| node__field_tags                 |
	| node_access                      |
	| node_field_data                  |
	| node_field_revision              |
	| node_revision                    |
	| node_revision__body              |
	| node_revision__comment           |
	| node_revision__field_image       |
	| node_revision__field_tags        |
	| path_alias                       |
	| path_alias_revision              |
	| router                           |
	| search_dataset                   |
	| search_index                     |
	| search_total                     |
	| sequences                        |
	| shortcut                         |
	| shortcut_field_data              |
	| shortcut_set_users               |
	| taxonomy_index                   |
	| taxonomy_term__parent            |
	| taxonomy_term_data               |
	| taxonomy_term_field_data         |
	| taxonomy_term_field_revision     |
	| taxonomy_term_revision           |
	| taxonomy_term_revision__parent   |
	| user__roles                      |
	| user__user_picture               |
	| users                            |
	| users_data                       |
	| users_field_data                 |
	| watchdog                         |
	+----------------------------------+
	```

table name prefixes, "pfx_", are not applied / missing
@pgnd pgnd closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant