PostgreSQL is the default. The connection string is set in .env:
DATABASE_URL="postgresql://symfony:secret@localhost:5432/symfony?serverVersion=18&charset=utf8"
Override locally by creating .env.local (gitignored):
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_dev.db"
mise run db:use postgres # PostgreSQL (default)
mise run db:use mysql # MySQL / MariaDB
mise run db:use sqlite # SQLite (no server required)This rewrites DATABASE_URL in .env.local, adjusts Doctrine's
identity_generation_preferences, wipes existing migrations, regenerates them for the
new platform, and runs them.
Pass --no-migrate to switch the URL only without touching migrations:
mise run db:use sqlite --no-migratemise run db:migrate # run pending migrations
mise run db:fresh # drop schema, re-run all migrations, reload fixtures (destructive)Seed the database with demo data:
mise run db:seedThis loads:
| Account | Password | Role | |
|---|---|---|---|
| Admin | admin@example.com |
password |
ROLE_ADMIN |
| Users (×10) | user.{n}@example.com |
password |
ROLE_USER |
The test environment appends a _test suffix to the database name
(dbname_suffix in config/packages/doctrine.yaml), so tests never touch your
development data. See Testing & Code Quality.