SQL logs

Separated logs.sql from the main.sql again, since you can keep them in a different database then the main tables.

Thanks Akkarin.