Sanitize database
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
🧹 Overview
This issue covers a database sanitization pass on the radio stations dataset for Antenna. The goal is to improve data quality by removing unusable entries, normalizing text fields, and adding standard audit/control columns.
💡 Motivation
- Stations with missing homepages, broken favicons, or unreachable stream endpoints degrade the user experience and waste resources
- Inconsistent station names and tags (special characters, mixed casing) make search, filtering, and display unreliable
- Lack of
activated,created_at, andupdated_atcolumns makes it impossible to track station lifecycle, audit changes, or selectively enable/disable entries - A clean dataset is a prerequisite for features like the station profile page and future recommendations
✅ Acceptance Criteria
Removal — Invalid Stations
- Remove stations where
homepageis null, empty, or malformed - Remove stations where
faviconis absent or returns a non-2xx response - Remove stations where the stream endpoint is unreachable (timeout or non-2xx after N retries)
- Log removed entries before deletion for audit purposes
Normalization — Names & Tags
- Strip leading/trailing whitespace from
nameandtags - Remove special characters from
name(keep alphanumeric, spaces, hyphens, and ampersands) - Normalize
tagsto lowercase and remove duplicates - Trim or collapse multiple consecutive spaces into one
Schema — New Columns
- Add
activated(boolean, defaulttrue) — allows soft-disabling a station without deletion - Add
created_at(timestamp, defaultnow()) — records when the row was inserted - Add
updated_at(timestamp, defaultnow(), auto-updates on row change) — tracks last modification - Write and apply a migration script for the new columns
- Backfill
created_atandupdated_atwith a reasonable default for existing rows
Validation
- Run the sanitization on a staging/test database first
- Confirm row counts before and after removal
- Verify no valid stations were incorrectly removed
📎 References
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the radio stations dataset and the schema or migration entry point; the issue does not name specific files or tests. Review how station records are currently validated and persisted before planning the sanitization pass. Done means the staging run logs removals, normalizes valid records, adds and backfills the lifecycle columns, and verifies before-and-after counts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data, database
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100