compscidr / goblog

Simple blogging platform built with golang. Built on top of gin and gorm. Auth with github. REST / CRUB API backend and templated frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Post-less tags

compscidr opened this issue · comments

if you inspect the db manually, you'll see tags which no longer have posts are not cleared up, leaving the tags db to grow large.

probably there should be some code that automatically removes the tag if there are no longer posts associated with it

also, there should be some pages added to the admin function which show tag->post mapping

Actually this is fine, its expected behavior - if they need to be actually cleared one can used the Unscoped: https://gorm.io/docs/delete.html