Moved the `type` column into its own table