Tag search
Easily remove unused MySQL databases
by Sander MarechalI use PHPUnit and the DbUnit extension for my unit tests. Because I use InnoDB tables with foreign keys I cannot use an SQLite database or temporary tables to run my unittests on. So, I have set up a separate MySQL server to run all my unittests on. My PHPUnit bootstrap script simply generates a random database name and imports the schema so that DbUnit can use it.
The only downside is that after a while, you get a bunch of unused databases on the server. So, I have written a simple bash cronjob that deletes all databases from the server that have not been used for 30 days. This script uses the debian-sys-maint MySQL user that is automatically set up on all Debian systems for maintenance tasks.
Keeping SugarCRM under Subversion control
by Sander MarechalI have been mulling a long time how I am going to keep track of SugarCRM, the custom modules I build and and changes to the core code that I need to make. The latter is sometimes unavoidable because some functionality cannot be built any other way. Also, sometimes you run into a bug that you need to fix, but you cannot wait for the next Sugar release. Of course, all of this needs to be done in a way that is easy for developers to work with. I think I have finally found a way that is workable and keeps everything under version control.
I will present my workflow in two articles. This article shows you how I keep SugarCRM itself under version control, how I deal with deployment and how I do upgrades in the face of changes to the core code. In “Build custom SugarCRM modules in Subversion” I will present how my custom modules—which are also under version control—fit into this system. Hat-tip to Leonid Mamchenkov for his work and insights.
T-DOSE 2008 in review
by Sander MarechalThis year was the third installment of the Technical Dutch Open Source Event (T-DOSE). Just as last year it was held at the Fontys University of Applied Science in Eindhoven. This years speakers included Arnoud Engelfriet (European patent attorney) and Ywein van den Brande on GPLv3 compliance, Roy Scholten (Drupal), Bas de Lange (Syllable), Jean-Paul Saman (VideoLan), Jörn Engel (logfs), Bert Boerland (Drupal), Tim Hemel (TMTTD) and many, many other speakers. Unfortunately your editor was only able to attend on Sunday, but the talks were great. Here are the details.
This article was originally posted on LXer Linux News.
Sun buys MySQL: Video interviews with Sun's James Gosling and MySQL's Monty Widenius
I don’t think anyone saw this coming: Sun buying MySQL AB for a billion dollars. Linux.com did a nice interview with the people responsible for it:
This morning Sun Microsystems announced that it was purchasing MySQL AB for $1 billion, $800 million of which is supposed to be paid in cash. This is a huge deal in the open source community. Two minutes after I heard the news, I begged an invitation to the “no press” MySQL company meeting at which the announcement had been made, drove two hours to Orlando, and sat down for lunch with Sun vice president (and Java creator) James Gosling and MySQL AB cofounder David Axmark. After lunch I corraled MySQL CTO (and original MySQL creator) Michael “Monty” Widenius and MySQL chief database architect Brian Aker, and got their opinions about how the acquisition might work out and what it means for both companies.
Source: Linux.com
Automagically convert Python objects to MySQL
by Sander MarechalI recently ran into an annoying little snag when using MySQL. Apparently MySQL cannot handle ISO 8601 datetime variables such as used by XML-RPC that use the format YYYYMMDDTHH:MM:SS. MySQL will simply convert such values to 0000-00-00 00:00:00 with a warning, so I was faced with the unpleasant prospect of converting all my XML-RPC dateTime values to something MySQL could understand.
I searched for a way to do this automatically and I came across a way tucked inside the MySQLdb Python module. MySQLdb contains a list of conversion functions and datatypes between MySQL's column types and Python's datatypes. It is possible to extend this list and pass it to the connect() method and have any datatype supported that you want. Here's how to do it.