Skip to content

Remove PromoCode field and hardcoded PromoCodes map #34

@BrewingCoder

Description

@BrewingCoder

Parent: #25 — Remove all SaaS billing code

What to Remove

Workspace struct

Field Line
PromoCode 307 (*string)

Resolver code

  • PromoCode struct definition — private-graph/graph/resolver.go:103-107
  • PromoCodes map with hardcoded promo codes — private-graph/graph/resolver.go:108-125
    • WEBDEVSIMPLIFIED, CATCHMYERRORS, SIMPLIFIEDHIGHLIGHT, USEGOLANG (Highlight.io marketing)

Callers

File Line Usage
private-graph/graph/schema.resolvers.go 425 PromoCode param in CreateWorkspace
private-graph/graph/schema.resolvers.go 522 Lookup: PromoCodes[strings.ToUpper(*promoCode)]
private-graph/graph/schema.resolvers.go 539 Assignment to workspace
private-graph/graph/generated/generated.go 97852 GraphQL field resolver
private-graph/graph/model/models_gen.go 94 Generated GraphQL model field

Migration Required

  • Drop promo_code from workspaces table

Test Plan

  • Remove field from Workspace
  • Remove PromoCode struct and PromoCodes map from resolver
  • Remove promo code logic from CreateWorkspace
  • Update GraphQL schema
  • Regenerate: make private-gen + yarn codegen
  • Add column-drop migration
  • Verify build + tests

🤖 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