Timelogs should use foreign keys
The migration db/migrate/20161223034646_create_timelogs_ce.rb
adds time tracking to CE, but no foreign keys are present. Using foreign keys makes data removal significantly user (= just remove the associated row), and ensures a consistent database. Make sure to use cascading deletes where possible.
cc @rymai