https://github.com/pagemachine/typo3-phinx
Phinx integration for TYPO3
https://github.com/pagemachine/typo3-phinx
migration phinx phinx-migrations typo3
Last synced: 4 months ago
JSON representation
Phinx integration for TYPO3
- Host: GitHub
- URL: https://github.com/pagemachine/typo3-phinx
- Owner: pagemachine
- License: gpl-3.0
- Created: 2020-12-04T06:25:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-11-27T10:04:38.000Z (7 months ago)
- Last Synced: 2026-01-29T21:55:49.725Z (5 months ago)
- Topics: migration, phinx, phinx-migrations, typo3
- Language: PHP
- Homepage:
- Size: 126 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phinx integration for TYPO3 
This package provides a integration of the [Phinx](https://phinx.org) database migration tool for TYPO3.
All Phinx commands have been wrapped as `phinx:` and can be executed using the TYPO3 CLI:
```
# Create a new migration
typo3 phinx:create
# Migrate the database
typo3 phinx:migrate
# Rollback the last or to a specific migration
typo3 phinx:rollback
# Show migration status
typo3 phinx:status
# Create a new database seeder
typo3 phinx:seed:create
# Run database seeders
typo3 phinx:seed:run
```
Notice that these wrapper commands are executed by TYPO3, thus the full API like `DataHandler` can be used in migrations.
## Migrations
The following paths are used for migrations:
* `migrations/phinx` (Composer Mode)
* `vendor/*/*/Migrations/Phinx`
* `vendor/*/*/Classes/Migrations/Phinx`
Examples to create a migration in a TYPO3 project:
* `typo3 phinx:create --path packages/provider/Classes/Migrations/Phinx MyMigration`
**Note**
If **one** `Migrations` directory exists already, you can omit `--path`.
However, should multiple exist, you will receive a prompt and have to select
the desired location.
## Seeds
The following paths are used for seeds:
* `migrations/phinx/seeds` (Composer Mode)
* `vendor/*/*/Migrations/Phinx/Seeds`
* `vendor/*/*/Classes/Migrations/Phinx/Seeds`
Examples to create a seed in a TYPO3 project:
* `typo3 phinx:seed:create --path packages/provider/Classes/Migrations/Phinx/Seed MySeeder`
**Note**
If **one** `Migrations/Seed` directory exists already, you can omit `--path`.
However, should multiple exist, you will receive a prompt and have to select
the desired location.
## Testing
All tests can be executed with the shipped Docker Compose definition:
docker compose run --rm app composer build