Skip to content

Document database seeding (insert initial data at startup) #651

Description

@developerjamiu

Demand

Kapa "Secrets & Seeding" cluster — 15 conversations / 15 users (highest user count in the audit). Seeding is essentially undocumented.

Problem

Users repeatedly ask how to insert initial or bulk data at server startup ("feed table data when the server starts", "seed films into the DB", "seed without raw SQL", "seed dummy data"). The only existing mention is an aside about a SQL INSERT inside a migration (06-database/11-migrations.md), which is not the programmatic pattern users are asking for.

Scope

  • New page under docs/06-concepts/06-database/ (e.g. seeding.md).
  • Startup hook / initialization pattern, including "insert only if the table is empty on first run".
  • Bulk insert via generated models (not raw SQL).
  • Guidance on migrations vs startup seeding, and when to use each.

Verify before writing

  • The recommended startup entry point for running seed code (confirm against the framework source / team).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestp1Priority 1

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions