Download the PHP package ariga/atlas-provider-doctrine without Composer
On this page you can find all versions of the php package ariga/atlas-provider-doctrine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ariga/atlas-provider-doctrine
More information about ariga/atlas-provider-doctrine
Files in ariga/atlas-provider-doctrine
Package atlas-provider-doctrine
Short Description Atlas provider for PHP doctrine ORM
License Apache-2.0
Informations about the package atlas-provider-doctrine
atlas-provider-doctrine
Load Doctrine entities into an Atlas project.
Use-cases
- Declarative migrations - use a Terraform-like
atlas schema apply --env doctrine
to apply your Doctrine schema to the database. - Automatic migration planning - use
atlas migrate diff --env doctrine
to automatically plan a migration from the current database version to the Doctrine schema.
Requirements
- DBAL -
composer require doctrine/dbal:^4
Installation
Install Atlas from macOS or Linux by running:
See atlasgo.io for more installation options.
Install the provider by running:
Doctrine Console Command
If all of your Doctrine entities exist under single directory, you can add the atlas-provider command to the Doctrine Console file:
Then in your project directory, create a new file named atlas.hcl
with the following contents:
As Symfony Bundle
If you are using a Symfony project, you can use the provider as a Symfony bundle.
add the following bundle to your config/bundles.php
file:
Then in your project directory, create a new file named atlas.hcl
with the following contents:
As PHP Script
If you have multiple folders with Doctrine entities, you might want to use the provider as a PHP script.
create a new file named atlas.php
with the following contents:
Then in your project directory, create a new file named atlas.hcl
with the following contents:
Usage
Once you have the provider installed, you can use it to apply your Doctrine schema to the database:
Apply
You can use the atlas schema apply
command to plan and apply a migration of your database to your current Doctrine schema.
This works by inspecting the target database and comparing it to the Doctrine schema and creating a migration plan.
Atlas will prompt you to confirm the migration plan before applying it to the database.
Where the -u
flag accepts the URL to the
target database.
Diff
Atlas supports a version migration
workflow, where each change to the database is versioned and recorded in a migration file. You can use the
atlas migrate diff
command to automatically generate a migration file that will migrate the database
from its latest revision to the current Doctrine schema.
`
Supported Databases
The provider supports the following databases:
- MySQL
- MariaDB
- PostgreSQL
- SQLite
- Microsoft SQL Server
Issues
Please report any issues or feature requests in the ariga/atlas repository.
License
This project is licensed under the Apache License 2.0.
All versions of atlas-provider-doctrine with dependencies
doctrine/dbal Version ^4
symfony/cache Version ^7
symfony/framework-bundle Version ^7
doctrine/doctrine-bundle Version ^2