BlueForge Docs

forge db-seed

Seed a database with test or initial data.

Command

forge db-seed <file> [--app <name>]

Arguments

NameTypeRequiredNotes
file
stringyesPath to seed SQL file

Flags

FlagTypeDefaultNotes
--app
stringProject or app name filter

Examples

Seed with data file:

forge db-seed ./seed-data.sql

Seed specific app:

forge db-seed ./seed-data.sql --app my-api

Errors

Exit codeMeaning
0Seed completed successfully
1Seed failed

Pitfalls

  • File format — the seed file should contain valid SQL statements.
  • Existing data — seeding does not truncate existing tables. Use
    TRUNCATE
    statements in the seed file if needed.

See also

{auto-injected}

Tested against

{auto-injected}