Skip to content

refactor(orm): rename seeds directory to seeders (Laravel parity)#173

Merged
tmgbedu merged 2 commits into
mainfrom
task/rename-seeds-to-seeders
Jul 13, 2026
Merged

refactor(orm): rename seeds directory to seeders (Laravel parity)#173
tmgbedu merged 2 commits into
mainfrom
task/rename-seeds-to-seeders

Conversation

@tmgbedu

@tmgbedu tmgbedu commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Renames the ORM seeder directory from seeds to seeders to match Laravel's database/seeders convention, and sweeps every reference across the core package, console commands, stubs, example apps, and docs so nothing breaks.

Changes

Core package

  • Renamed masoniteorm/seeds/masoniteorm/seeders/ (public import path is now fastapi_startkit.masoniteorm.seeders)
  • Updated the internal from ..seeds import Seeder in DBSeedCommand
  • Changed the default --directory / seed_path from databases/seedsdatabases/seeders in: db:seed, seed (make:seed), make:model (--seeders-directory), migrate:fresh, migrate:refresh, and the Seeder constructor default
  • Updated create_seed.stub — applied the rename and corrected its module prefix (was masoniteorm.seeds, now fastapi_startkit.masoniteorm.seeders) so generated seeder files import correctly, matching the example apps

Example apps

  • Renamed example/database-app/databases/seeds/seeders/ and updated all 6 seeder imports
  • Moved example/inertia-pingcrm-app/databases/seeds/database_seeder.py into the existing seeders/ directory (that app already had a seeders/), updated its import, and removed the leftover seeds/ dir

Docs / skills

  • Updated the database SKILL snippet import

Verification

  • Import smoke test: from fastapi_startkit.masoniteorm.seeders import Seeder resolves; default seed_path is now databases/seeders
  • Full test suite: 1802 passed, 7 skipped. The only failures are the Postgres tests (connection refused — no live Postgres locally, expected per project docs); none relate to this change
  • Repo-wide grep confirms no stale databases/seeds / masoniteorm.seeds references remain

Note for reviewer

The stub previously imported from masoniteorm.seeds (missing the fastapi_startkit. prefix) — I corrected the prefix while renaming so generated seeders actually import. Flagging in case that behavioral fix should be split out.

Rename the ORM seeder directory from 'seeds' to 'seeders' to match
Laravel's database/seeders convention, and update every reference.

- Rename core package masoniteorm/seeds -> masoniteorm/seeders
  (import path is now fastapi_startkit.masoniteorm.seeders)
- Change the default --directory / seed_path from databases/seeds
  to databases/seeders across db:seed, seed (make:seed), make:model,
  migrate:fresh, and migrate:refresh
- Update the create_seed stub import (also fixing its previously
  incorrect module prefix so generated seeders import correctly)
- Rename example app seeder directories and update their imports
- Update the database SKILL doc snippet
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Cover Seeder.call() ordering/connection propagation, run_database_seed
and run_specific_seed happy/error paths via pydoc.locate, and the full
DBSeedCommand handle path (default DatabaseSeeder, table argument,
--class variants, connection default/override, and not-found errors)
using cleo's CommandTester against sqlite-safe fixture seeder modules.
@tmgbedu tmgbedu merged commit 8c341b8 into main Jul 13, 2026
6 checks passed
@tmgbedu tmgbedu deleted the task/rename-seeds-to-seeders branch July 13, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant