check if the table exists before execute the SQL command
Merge pull request #19 from Zeromax/fix-missing-tables

Check if the referenced database table exists before execute the SQL command.