سؤال

Just to be sure, which solution is better when I export / import DB ?

  • just exclude Users table from my dump export ?
  • keep exporting users table but exclude users table content from my dump export ?

Because I would to to have different access code between production and developpment websites. Thanks

EDIT: to @sanzante just a test on a dev website, and I get an error:

drush @pfdevd6mg sql-sanitize --sanitize-password=newpassword
PHP Warning:  Module 'curl' already loaded in Unknown on line 0

The following operations will be done on the target database:
 * Reset passwords and email addresses in users table
 * Truncate Drupal's sessions table

Do you really want to sanitize the current database? (y/n): y
Sanitize query failed.

does alias aren't possible ?

هل كانت مفيدة؟

المحلول

If your only concern is to have different passwords you can use drush sanitize to change all passwords afer importing the DB into dev environment.

drush sql-sanitize --sanitize-password=devpassword

This changes all users password to 'devpassword'.

The command also sanitizes all user emails (so your dev site will never send mails to real users).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى drupal.stackexchange
scroll top