Start by logging into MySQL as root:
mysql -u root
Enter the following SQL statements:
SET GLOBAL query_cache_type=OFF;
(function($){ | |
$.fn.extend({ | |
example: function(options) { | |
var defaults = { | |
color: '#000000', | |
} | |
Start by logging into MySQL as root:
mysql -u root
Enter the following SQL statements:
SET GLOBAL query_cache_type=OFF;
cd sites/example | |
drush -v sqlq 'UPDATE system SET filename = REPLACE(filename, "example", "example2")' | |
mv sites/example sites/example2 | |
drush rr -v # This is Registry Rebuild Drush command | |
# Then, browse your code and search for URLs containing sites/example. |
<?php | |
/** | |
* @file | |
* Runs a set of steps to upgrade a database to be in line with code. | |
*/ | |
/** | |
* Implements hook_drush_command(). | |
*/ | |
function upgradepath_drush_command() { |
dependencies[] = ctools | |
; Views Handlers | |
files[] = views/mymodule_handler_handlername.inc |
Things to sort out before arriving to DrupalCamp Spain 2014:
<?php | |
/** | |
* Implement of drush_hook_COMMAND_validate(). | |
* | |
* Prevent catastrophic sql-sync to live. Note that this file has to be local to the | |
* machine that intitiates sql-sync command. | |
*/ | |
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) { | |
if (strstr($destination, '.prod')) { |
#!/bin/bash | |
docker stop `docker ps -aq` | |
docker rm `docker ps -aq` | |
docker rmi `docker images -aq` |
<?php | |
$file = system_retrieve_file($remote_file_url); | |
$node->field_image[$node->language][] = (array) $file; | |
node_save($node); |