Files
sm-seo-plugin/updates/202611040001_create_golem15_seo_noindex_paths.go
Jakub Zych 9de6b2ec83 feat: noindex paths from the route report leave the sitemaps (tracer)
The route report takes an optional noindex list of static paths. When
the key is present the stored set (golem15_seo_noindex_paths) is
replaced, and the sitemap filter leaves those paths out with the reason
noindex; a changed set asks the sitemap for a debounced rebuild through
contract.Rebuilder. A listed noindex address without a CMS record now
names sitemap_update_settings, or fix: code without the sitemap plugin.
2026-11-04 22:44:26 +01:00

29 lines
760 B
Go

package updates
import (
"github.com/go-gormigrate/gormigrate/v2"
"gorm.io/gorm"
)
// createNoindexPaths creates golem15_seo_noindex_paths (P33-58): the static
// paths the frontend's route report names noindex, normalised like the
// reported routes. The sitemap filter leaves them out of the sitemaps.
var createNoindexPaths = []*gormigrate.Migration{
{
ID: "202611040001_create_golem15_seo_noindex_paths",
Migrate: func(tx *gorm.DB) error {
return tx.Exec(`CREATE TABLE golem15_seo_noindex_paths (
path TEXT PRIMARY KEY,
reported_at TIMESTAMP(0) NOT NULL
)`).Error
},
Rollback: func(tx *gorm.DB) error {
return tx.Exec(`DROP TABLE IF EXISTS golem15_seo_noindex_paths`).Error
},
},
}
func init() {
Register(createNoindexPaths...)
}