Removed aggregateId and replaced it with aggregateType

Remember to update schema.sql, and column aggregateid to aggregatetype in database