Skip to content

Remove SendBillingNotifications, BillingEmailHistory, and emailHistoryCache #26

@BrewingCoder

Description

@BrewingCoder

Parent: #25 — Remove all SaaS billing code

What to Remove

  • SendBillingNotifications() function — model/model.go:1995
  • BillingEmailHistory struct — model/model.go:1356
  • emailHistoryCache global var — model/model.go:40 (+ init at :216-218)
  • BillingEmailHistory entry in Models slice — model/model.go:185
  • TTL cache import: github.com/ReneKroon/ttlcache

Callers (must be updated/removed)

File Line Usage
public-graph/graph/resolver.go 692, 696 Calls for errors usage 80%/100%
public-graph/graph/resolver.go 1270, 1274 Calls for session usage 80%/100%
worker/kafka_worker.go 380 Calls in batch processing loop
private-graph/graph/resolver_test.go 1168-1201 Test creates BillingEmailHistory records

Migration Required

  • Add DB migration to drop billing_email_histories table
  • Drop unique index email_history_active_workspace_type_idx

Test Plan

  • Remove function and struct
  • Update callers to no-op or remove billing notification calls entirely
  • Update/remove resolver_test.go test that creates BillingEmailHistory
  • Add migration to drop table
  • Verify go build ./... passes
  • Verify go test ./... passes
  • Run SonarQube scan

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions