database: add a transaction for tables creation
database: add a transaction for tables creation

Creation of tables in the database can fail. If it occurs, we must not
let the database in a weird state. So, table creation is in a
transaction and if it fails, rollback this transaction and throw a
runtime_error.

Change-Id: I7ac4a891545eb18964f47884d57d43e47bf1fa02
Reviewed-by: Guillaume Roguez <c893c3c233d1d66ba2b37888cbe8e58c0b98cee5@savoirfairelinux.com>

savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc