Saturday, 19 March 2016

MySQL Compare 1.0.0.666 doesn't recognise UNIQUE KEY column lengths

I have a Joomla! table:
CREATE TABLE `jos_messages_cfg` (
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `cfg_name` text NOT NULL,
  `cfg_value` text NOT NULL,
  UNIQUE KEY `idx_user_var_name` (`user_id`,`cfg_name`(100))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
MySQL compare doesn't recognise the UNIQUE KEY column length.

Which results in:


Notes:

  • It should pick up the UNIQUE KEY correctly
  • It's a shame it's not possible to copy the error from this error dialog
  • Errors do NOT result in an option of a re-compare

SQL Workbench 6.3 unable to dump db

Dumping all tables I get: mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE'

The answer according to:

  http://stackoverflow.com/questions/20128223/export-data-from-mysql-workbench-6-0

is to change the Python so it doesn't spit out the variable :(

Saturday, 5 March 2016

Bulk delete GoDaddy e-mail forwarders

Unfortunately even restoring e-mail forwarders from backup doesn't delete existing forwarding addresses.

I created the following script to do some batch deletion.


  1. Use Chrome (for example) to open the forwarders page (e.g. .../frontend/gl_paper_lantern/mail/fwds.html)
  2. Filter the forwarders you want deleting.
  3. Open the developer tools (F12)
  4. Paste the following into the Console


/// USE THIS AT YOUR OWN RISK!
(function() {
var popups = [];
$('a[href*="dodelfwdconfirm.html"]').each(function(i) {
var url = $(this).attr('href').replace('dodelfwdconfirm','dodelfwd');
popups[i] = window.open(url);
setTimeout(function() {
popups[i].close();
}, 2500);
});
})();