Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 13, 2024 via composer

doctrine/migrations 3.7.2

PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.
Package summary
Share
0
issues
1
license
16
MIT
Package created
10 Oct 2011
Version published
5 Dec 2023
Maintainers
2
Total deps
16
Direct deps
7
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
16 Packages, Including:
doctrine/dbal@4.0.1
doctrine/deprecations@1.1.3
doctrine/event-manager@2.0.0
doctrine/migrations@3.7.2
psr/cache@3.0.0
psr/container@2.0.2
psr/log@3.0.0
symfony/console@v7.0.6
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-grapheme@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/service-contracts@v3.4.2
symfony/stopwatch@v7.0.3
symfony/string@v7.0.4
symfony/var-exporter@v7.0.6
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

7
All Dependencies CSV
β“˜ This is a list of doctrine/migrations 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
doctrine/dbal4.0.1-MIT
prod
doctrine/deprecations1.1.37.42 kBMIT
prod
doctrine/event-manager2.0.05.95 kBMIT
prod
psr/log3.0.06.77 kBMIT
prod dev
symfony/consolev7.0.6180.99 kBMIT
prod dev
symfony/stopwatchv7.0.37.56 kBMIT
prod dev
symfony/var-exporterv7.0.6-MIT
prod dev

Visualizations

Frequently Asked Questions

What does doctrine/migrations do?

Doctrine/Migrations is a popular PHP package that provides additional capabilities for versioning your database schema and effectively deploying changes to it. This tool, which works atop the Database Abstraction Layer (DBAL), is both potent and user-friendly. It is an indispensable aspect of the Doctrine Project that aids developers in ensuring database schemas are consistently maintained and updated across various environments.

How do you use doctrine/migrations?

To get started with Doctrine/Migrations, first, ensure you have composer installed. Then proceed by pulling in the package into your PHP project using the composer require command. In command line interface, simply run:

composer require doctrine/migrations

After successfully introducing the Doctrine Migrations library into your project, you can leverage its functionality to manage your database migrations. Here's a basic example:

use Doctrine\DBAL\DriverManager;
use Doctrine\Migrations\Configuration\Connection\ExistingConnection;
use Doctrine\Migrations\Configuration\Migration\ConfigurationArray;
use Doctrine\Migrations\DependencyFactory;

$connection = DriverManager::getConnection(['url' => 'sqlite:///:memory:']);
$config = new ConfigurationArray([
    'table_storage' => [
        'table_name' => 'doctrine_migration_versions',
        'version_column_name' => 'version',
        'version_column_length' => 1024,
        'executed_at_column_name' => 'executed_at',
    ],
    'migrations_paths' => [
        'MyProject\Migrations' => './migrations',
        'MyProject\Component\Migrations' => './component/migrations',
    ],
    'all_or_nothing' => true,
    'check_database_platform' => true,
]);

$dependencyFactory = DependencyFactory::fromConnection($config, new ExistingConnection($connection));

// returns an instance of Doctrine\Migrations\Migration
$migration = $dependencyFactory->getMigration();

// execute a migration up
$migration->migrate();

This is just a simple demonstration and the real power of Doctrine Migrations comes with complete migration classes where you write up and down schema alterations for deployment.

Where are the doctrine/migrations docs?

The comprehensive documentation for the Doctrine/Migrations package is accessible at the Doctrine Project's official website. It provides a wealth of information covering different aspects of the tool, from installation to advanced use-cases. To dive deep into the world of Doctrine Migrations, check out the documentation by clicking here.