Add the database in one large transaction

Signed-off-by: David Scott <dave.scott@eu.citrix.com>