sql: fix 003 downgrade

I guess nobody ever had to use it, but the SQL query built isn't used
currently.

Fixes: bug #1186263

Change-Id: I81437beb65775d412ff1433617ee64eda6d6af61
Signed-off-by: Julien Danjou <julien@danjou.info>