~george-edison55/charms/oneiric/thinkup/update-to-1-0-2

« back to all changes in this revision

Viewing changes to hooks/db-relation-changed

  • Committer: Nathan Osman
  • Date: 2011-11-23 03:02:26 UTC
  • Revision ID: admin@quickmediasolutions.com-20111123030226-d74ebw457tsc0k85
Added SQL to enable all plugins upon DB configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
EOD
32
32
 
33
33
# Execute the SQL that creates the tables
34
 
juju-log "Creating database tables and opening registration"
 
34
juju-log "Creating database tables and finalizing configuration"
35
35
cat > /tmp/enable_open_registration.sql <<EOD
36
36
INSERT INTO $DATABASE.tu_options (namespace, option_name, option_value, last_updated, created) VALUES ('application_options', 'is_registration_open', 'true', NOW(), NOW());
 
37
UPDATE $DATABASE.tu_plugins SET is_active = 1;
37
38
EOD
38
39
cat /var/www/install/sql/build-db_mysql.sql /tmp/enable_open_registration.sql | mysql -u$DB_USER -p$DB_PASS -h$DB_HOST $DATABASE