Practicalweb Ltd

Technical information on this site may be out of date : no updates since 2015

Drupal Live and Dev sync

July 23, 2009 , posted under drupal sql

When developing Drupal one often needs to pull recent copies of the live database into the dev environment.

Loading a dump into the dev database will update any existing tables, add any new ones - but it won’t remove tables from the dev environment that re not in live.

Read More…

SQL Greatest and Least

July 21, 2009 , posted under postgresql mysql sql

Most of the time I can get what I want out of SQL using the standard aggregate functions, but today I needed to find the latest timestamp from any one of three columns.

I achieved this using the GREATEST() function, it’s not part of the SQL standard but is commonly available.

Read More…

Updating Drupal

December 15, 2008 , posted under drupal mysql sql

For most of 2008 I’ve been working on a large Drupal installation (around 10 developers,  something like 100 custom modules, 17 languages, split over 2 sites).

This all adds up to a lot of updates, and schema changes.

Read More…

Number Crunching : Database vs OOP

October 5, 2008 , posted under testing best practice sql oop

For the last few months I’ve been working on a project that is part website and part data processing.

In theory the website is the bulk of the project, but in practice processing the data has taken a disproportionate amount of resources.

Data exchange with another organisation is always tricky - and in this case we have incoming data that doesn’t conform to specification, business rules that change, and a daily data import to run.

The code I’ve been working on has been through a couple of versions, and now I have in mind a third

Read More…

Adding comments to the database

July 31, 2008 , posted under documentation mysql sql

Comments in code are widely used and generally (but not universally) accepted as a good thing.

Databases can also accommodate comments - but these seem to be very rarely used.

I’m of the opinion that database comments are very useful.

Read More…