Store names in a Doctrine entity, seed via migration #1

Open
geusebio wants to merge 1 commit from claude/data-migration-doctrine-entity-bf52a5 into main
Owner

Summary

  • Adds Doctrine ORM + Doctrine Migrations Bundle; names are now mapped by an App\Entity\Name entity instead of raw PDO queries.
  • Schema creation and seed data move into a Doctrine migration (migrations/Version20260723085751.php), replacing docker/mysql/init.sql.
  • Migrations run automatically inside the app container: a runit sv-fixer.d init hook (docker/sv-fixer.d/20_migrate.sh) executes doctrine:migrations:migrate synchronously before nginx/php-fpm start — no separate compose service or manual step required.

Test plan

  • docker compose build succeeds
  • Fresh docker compose up (empty volume): app container log shows the migration running and completing before php-fpm/nginx start
  • curl localhost:$WEB_PORT/ returns a randomized name from the seeded data
  • Restarting the container re-runs the hook idempotently ("Already at the latest version", no errors)
## Summary - Adds Doctrine ORM + Doctrine Migrations Bundle; names are now mapped by an `App\Entity\Name` entity instead of raw PDO queries. - Schema creation and seed data move into a Doctrine migration (`migrations/Version20260723085751.php`), replacing `docker/mysql/init.sql`. - Migrations run automatically inside the app container: a runit `sv-fixer.d` init hook (`docker/sv-fixer.d/20_migrate.sh`) executes `doctrine:migrations:migrate` synchronously before nginx/php-fpm start — no separate compose service or manual step required. ## Test plan - [x] `docker compose build` succeeds - [x] Fresh `docker compose up` (empty volume): app container log shows the migration running and completing before php-fpm/nginx start - [x] `curl localhost:$WEB_PORT/` returns a randomized name from the seeded data - [x] Restarting the container re-runs the hook idempotently ("Already at the latest version", no errors)
Adds doctrine/orm and doctrine/doctrine-migrations-bundle, maps the
firstnames table to an App\Entity\Name entity, and moves schema
creation + seed data into a Doctrine migration (replacing the raw
docker/mysql/init.sql). The migration now runs automatically inside
the app container itself via a runit sv-fixer.d init hook, which
executes synchronously before nginx/php-fpm start.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/data-migration-doctrine-entity-bf52a5:claude/data-migration-doctrine-entity-bf52a5
git switch claude/data-migration-doctrine-entity-bf52a5

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff claude/data-migration-doctrine-entity-bf52a5
git switch claude/data-migration-doctrine-entity-bf52a5
git rebase main
git switch main
git merge --ff-only claude/data-migration-doctrine-entity-bf52a5
git switch claude/data-migration-doctrine-entity-bf52a5
git rebase main
git switch main
git merge --no-ff claude/data-migration-doctrine-entity-bf52a5
git switch main
git merge --squash claude/data-migration-doctrine-entity-bf52a5
git switch main
git merge --ff-only claude/data-migration-doctrine-entity-bf52a5
git switch main
git merge claude/data-migration-doctrine-entity-bf52a5
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grey.ooo/someones.computer_example_app!1
No description provided.