Download the PHP package nudelsalat/migrations without Composer
On this page you can find all versions of the php package nudelsalat/migrations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nudelsalat/migrations
More information about nudelsalat/migrations
Files in nudelsalat/migrations
Package migrations
Short Description State-based database migration engine for PHP with full ORM support
License Apache-2.0
Homepage https://asadraza-69.github.io/nudelsalat_doc/
Informations about the package migrations
Nudelsalat 🐘👑
State-based database migration engine for PHP.
Nudelsalat is a professional-grade migration engine that brings framework-level features to any PHP project. It offers intelligent autodetection, version-resilient data migrations, and rock-solid integrity protection.
Why Nudelsalat?
Most PHP migration libraries are either too simple (manual SQL scripts) or too coupled to a specific framework. Nudelsalat provides a standalone, configuration-driven engine with "High-IQ" features:
- 🧠 Intelligent Autodetector: Say goodbye to manual migration writing. Nudelsalat scans your models and detects renames, type changes, and relationship shifts automatically.
- 🛡️ The Integrity Shield: Every migration has a SHA256 checksum. Nudelsalat prevents "migration drift" by blocking edits to already-applied history.
- 🧬 Relational Mastery: Automatic Many-to-Many junction table management and Foreign Key orchestration across MySQL, PostgreSQL, and SQLite.
- ❄️ Frozen History: Data migrations use a
StateRegistryto access models exactly as they existed when the migration was written. Your history is indestructible. - 🔍 Database Introspect: Already have a database? Use
./nudelsalat introspectto automatically generate your PHP Model classes in seconds.
Installation
Via Composer (Recommended)
Manual Installation
Quick Start
1. Configuration
Create a nudelsalat.config.php in your project root:
2. Define Models
Create your models in src/Models/:
3. The Development Loop
- Change your Model: Add a field to one of your classes in
src/Models/. - Make Migration: Run
./nudelsalat makemigrations. Nudelsalat detects the delta and creates a file. - Migrate: Run
./nudelsalat migrate. Your database is now in sync.
Requirements
- PHP 8.1 or higher
- PDO extension with one of:
pdo_pgsql- PostgreSQLpdo_mysql- MySQL/MariaDBpdo_sqlite- SQLite
Commands
| Command | Description |
|---|---|
makemigrations |
Detect model changes and generate a new migration file. |
migrate |
Apply all pending migrations to the database. |
show |
List all historical and pending migrations. |
check |
[CI/CD] Verify that models and migrations are in sync. |
sqlmigrate |
Preview the raw SQL Nudelsalat will execute for a migration. |
introspect |
Scan your DB and generate Model classes automatically. |
optimize |
Optimize an existing migration file by reducing operations. |
squash |
Collapse multiple migrations into one. |
merge |
Resolve divergent migration branches. |
Features
- 26 Migration Operations - CreateModel, DeleteModel, AddField, RemoveField, AlterField, RenameField, and more
- Model Options - AlterModelTable, AlterModelOptions, AlterUniqueTogether, AlterIndexTogether, etc.
- State Registry - HistoricalModel API for safe data migrations
- Multi-Database Routing - AppLabelRouter, CompositeMigrationRouter
- Multi-Pass Optimizer - Operation reduction for cleaner migrations
- Fake Initial - Detect already-existing tables
- Replacement/Squash - Full support for squashed migrations
Testing
The test suite includes 55+ tests covering:
- Autodetector
- Graph/DAG operations
- Loader/Writer
- Executor integration
- Backend portability (MySQL, PostgreSQL, SQLite)
- Multi-database routing
Documentation
For detailed guides, check out our library:
- Getting Started
- CLI Command Encyclopedia
- Relationships & Fields
- Advanced Features
Or view the Online Documentation.
Built with ❤️ for the PHP Ecosystem.