Skip to content

Commit

Permalink
Add db_prefix set
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Tack committed Nov 28, 2012
1 parent b8a0070 commit 8404985
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions bin/didify
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end
files = {
"Capfile" => unindent(<<-FILE),
require 'railsless-deploy' # gem install railsless-deploy
require 'didi/recipes/didi.rb' # gem install capistrano-didi
require 'didi/recipes/didi.rb' # gem install capistrano-didi
load 'config/deploy'
require 'capistrano/ext/multistage' # gem install capistrano
FILE
Expand All @@ -59,6 +59,7 @@ set :db_type, "mysql"
set :db_name, "database_name"
set :db_username, "database_user_name"
set :db_password, "database_password"
set :db_prefix, "database_prefix"
set :profile, "minimal"
set :domain, "default"
Expand All @@ -69,9 +70,9 @@ set :adminpass, "drupal_admin_pass"
set :baseline, "drupal_feature_to_activate_after_fresh_install"
',
"config/sql/staging.sql" => <<scrub
--
--
-- Scrub important information from a Drupal database.
--
--
-- Remove all email addresses.
UPDATE users SET mail=CONCAT('user', uid, '@example.com'), init=CONCAT('user', uid, '@example.com') WHERE uid != 0;
Expand Down Expand Up @@ -102,7 +103,7 @@ UPDATE users SET mail=CONCAT('user', uid, '@example.com'), init=CONCAT('user', u
-- TRUNCATE custom_customer_lead_data;
-- USER PASSWORDS
-- These statements assume you want to preserve real passwords for developers. Change 'rid=3' to the
-- These statements assume you want to preserve real passwords for developers. Change 'rid=3' to the
-- developer or test role you want to preserve.
-- DRUPAL 6
Expand All @@ -113,9 +114,9 @@ UPDATE users SET mail=CONCAT('user', uid, '@example.com'), init=CONCAT('user', u
-- UPDATE users SET pass = MD5('supersecret!') WHERE uid = 1;
-- DRUPAL 7
-- Drupal 7 requires sites to generate a hashed password specific to their site. A script in the
-- Drupal 7 requires sites to generate a hashed password specific to their site. A script in the
-- docroot/scripts directory is provided for doing this. From your docroot run the following:
--
--
-- scripts/password-hash.sh password
--
-- this will generate a hash for the password "password". In the following statements replace
Expand Down
5 changes: 3 additions & 2 deletions lib/didi/recipes/didi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
_cset(:db_name) { abort "Please specify the Drupal database name (:db_name)." }
_cset(:db_username) { abort "Please specify the Drupal database username (:db_username)." }
_cset(:db_password) { abort "Please specify the Drupal database password (:db_password)." }
_cset(:db_prefix) { abort "Please specify the Drupal database prefix (:db_prefix)." }

_cset(:profile) { abort "Please specify the Drupal install profile (:profile)." }
_cset(:site) { abort "Please specify the Drupal site (:site)." }
Expand Down Expand Up @@ -258,7 +259,7 @@
end

end

namespace :web do
desc "Makes the application web-accessible again."
task :enable do
Expand Down Expand Up @@ -535,7 +536,7 @@ def drupal_settings(version, domain)
'host' => '#{db_host}',
'port' => '',
'driver' => '#{db_type}',
'prefix' => '',
'prefix' => '#{db_prefix}',
)));
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
Expand Down

0 comments on commit 8404985

Please sign in to comment.