Download the PHP package nowo-tech/migrations-kit-bundle without Composer
On this page you can find all versions of the php package nowo-tech/migrations-kit-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nowo-tech/migrations-kit-bundle
More information about nowo-tech/migrations-kit-bundle
Files in nowo-tech/migrations-kit-bundle
Package migrations-kit-bundle
Short Description Symfony bundle providing migration helpers: schema checks (table/column/index exists) and array-based migration definitions. Use in Doctrine Migrations with Symfony 7|8.
License MIT
Homepage https://github.com/nowo-tech/migrations-kit-bundle
Informations about the package migrations-kit-bundle
Migrations Kit Bundle
Symfony bundle that provides helpers for Doctrine Migrations: schema checks (table/column/index exist) and array-based migration definitions, so you can write idempotent migrations without repeating SQL and with safe checks. For Symfony 6, 7 or 8 · PHP 8.1+ · Doctrine DBAL 2.x–4.x and doctrine/migrations 3.x–4.x.
⭐ Found this useful? Install from Packagist · Give it a star on GitHub so more developers can find it.
Table of contents
- Quick search terms
- Features
- Installation
- Configuration
- Usage
- Documentation
- Requirements
- Demo
- Development
- License & author
Quick search terms
Looking for Doctrine migrations helpers, table exists migration, column exists check, idempotent migrations, migration schema check, Symfony Doctrine Migrations, declarative schema migrations? You're in the right place.
Features
- ✅ SchemaChecker —
tableExists,columnExists,indexExists,hasPrimaryKey,foreignKeyExists,listTableColumns; no container injection:new SchemaChecker($this->connection) - ✅ CreateTablesService — apply declarative definition arrays (MDK format); create/drop tables, add/drop/rename/modify columns, add/drop indexes, foreign keys; call
apply($schema, $definition)with introspected schema and add each returned SQL with$this->addSql() - ✅ MigrationDefinitionKeys (MDK) — constants for definition keys (
tables,columns,primary_key,indexes,foreign_keys,drop_columns, etc.); use alias MDK in code; see DECLARATIVE_SCHEMA.md - ✅ Array of associative arrays — columns, indexes, FKs defined as arrays of items (each with
name/columns,type,drop,rename, etc.); no raw SQL for schema changes - ✅ Recommended practice — use separate migrations: first add column, then add index, then add foreign key; when dropping, first drop indexes then drop columns (see docs/USAGE.md). The bundle always applies operations in the correct order (drops: FK → index → column; adds: columns → PK → indexes → FKs), but phased migrations are more stable
- ✅ Compatible with Doctrine DBAL 2.x, 3.x, 4.x and doctrine/migrations 3.x, 4.x
- ✅ SQLite, MySQL and PostgreSQL — schema checks and migrations work with all three
- ✅ Symfony Flex recipe (register bundle + config; see docs/INSTALLATION.md)
- ✅ Demos for Symfony 7 and 8 with example migrations (create table, add/rename/drop columns, indexes, FKs); Make targets to view migration SQL (
migrate-verbose,migrate-dry-run,migrate-write-sql)
Installation
With Symfony Flex, the recipe (when enabled) registers the bundle and creates the config file automatically. Without Flex, see docs/INSTALLATION.md for manual steps.
Manual registration in config/bundles.php:
Configuration
Create config/packages/nowo_migrations_kit.yaml (optional; defaults to connection: default):
Full options: docs/CONFIGURATION.md.
Usage
In your migration, use the migration's connection — no service injection required:
SchemaChecker — run SQL only when something does not exist:
CreateTablesService — apply a declarative definition (MDK format); the service returns the list of SQL statements; add each with $this->addSql():
More examples: docs/EXAMPLE.md.
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Changelog
- Upgrading
- Release
- Security
- Engram
- Roadmap
Additional documentation
- Demo with FrankenPHP (development and production)
- Example
- Declarative schema
- Demo migrations reference
- Demo
- Flow diagrams
Requirements
- PHP >= 8.1
- Symfony 6, 7 or 8 (^6.0 || ^7.0 || ^8.0)
- doctrine/doctrine-bundle ^2.8 || ^3.0
- doctrine/dbal ^2.13 || ^3.0 || ^4.0
- doctrine/migrations ^3.5 || ^4.0
Databases: the bundle is compatible with SQLite, MySQL and PostgreSQL. Use the same migrations and helpers; platform-specific SQL is handled by Doctrine DBAL.
See docs/UPGRADING.md for compatibility notes.
Demo
Demos for Symfony 7 and 8 are in demo/symfony7, demo/symfony8. Each runs with FrankenPHP in Docker. With the default APP_ENV=dev, the entrypoint uses Caddyfile.dev (no PHP worker: one process per request). Production-style demos use the default Caddyfile with worker mode (see demo/README.md and each demo/symfony*/README.md have run instructions.
Development
Run tests and QA with Docker: docker compose up -d --build && docker compose exec php composer install && docker compose exec php composer test (or composer test-coverage, composer qa). Without Docker: composer install && composer test. See Makefile for all targets.
Tests and coverage
- Tests: PHPUnit (PHP)
- PHP: 99.39%
- TS/JS: N/A
- Python: N/A
License
The MIT License (MIT). Please see LICENSE for more information.
Author
Created by Héctor Franco Aceituno at Nowo.tech
All versions of migrations-kit-bundle with dependencies
doctrine/dbal Version ^2.13 || ^3.0 || ^4.0
doctrine/doctrine-bundle Version ^2.8 || ^3.0
doctrine/migrations Version ^3.5 || ^4.0
symfony/config Version ^6.0 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.0 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.0 || ^7.0 || ^8.0
symfony/yaml Version ^6.0 || ^7.0 || ^8.0