Fix database initialization
Define multiple primary keys in DB.{History, OutputHistory} in separate constraint