Skip to content

MySQL-compatible tag upsert, direct driver deps, multi-DB docs and compose verification #346

Description

@joestump

Part of #302 (EPIC: Multi-Database MariaDB Compatibility). Extends #307. Governing: ADR-0023, SPEC-0014 (multi-database-support). Depends on: #307 (MariaDB DDL), #324 (Lidarr-optional unblocks the compose MUST-start scenarios).

The audit found MariaDB is broken at three layers beyond #307's DDL scope — a SPOTTER_DATABASE_DRIVER=mysql deployment currently exits at startup, and would fail on first tag write even after DDL lands:

Requirements

  • Tag upsert SQL is Postgres/SQLite-only (audit CRITICAL): $1..$6 placeholders + ON CONFLICT ... DO NOTHING — MySQL needs ? placeholders and INSERT IGNORE/ON DUPLICATE KEY (internal/tags/upsert.go:87-97). Make it dialect-aware
  • go.mod: lib/pq and go-sql-driver/mysql are in the indirect block despite blank imports; move to direct requires per SPEC-0014 (go mod tidy) — audit WARNING
  • Docs (audit CRITICAL): docs-site configuration reference documents only sqlite3/postgres — add mysql/mariadb driver + DSN examples, the pure-Go/no-CGO note, and link docker-compose.mariadb.yml from docker.md (docs-site/docs/getting-started/configuration.md:48-55,189-195; docker.md:15-26)
  • Verify the SPEC-0014 compose scenarios end-to-end: docker compose -f docker-compose.mariadb.yml up starts, connects, and completes a tag write (CI job or documented manual verification)

Acceptance Criteria

  • Fresh MariaDB deployment boots, migrates, and persists tags
  • Docs cover all three drivers with working DSN examples

Branch

feature/346-mysql-upsert-docs-compose

PR Convention

PR title references the story; body ends with Closes #346, references the parent epic and governing artifacts above.

🤖 Posted on behalf of @joestump by Claude.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendGo backend codebugSomething isn't workingdocumentationImprovements or additions to documentationqueuedIssue is queued for workstoryStory issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions