Download the PHP package itemvirtual/laravel-doctrine without Composer
On this page you can find all versions of the php package itemvirtual/laravel-doctrine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itemvirtual/laravel-doctrine
More information about itemvirtual/laravel-doctrine
Files in itemvirtual/laravel-doctrine
Package laravel-doctrine
Short Description Doctrine Console Commands for Laravel framework
License MIT
Homepage https://github.com/itemvirtual/laravel-doctrine
Informations about the package laravel-doctrine
Laravel Doctrine
Doctrine Console Commands for Laravel framework.
This package is just to keep your database in sync (instead of migrations).
Update, validate and generate xml-mappings from the database.
Installation
You can install the package via composer:
In order to edit the default configuration you may execute: (with --force
option to update)
Laravel comes with some predefined migrations, you can put them in place with this publish
Usage
· Generate xml-mappings from database
This command is only useful when you have an existing database, It should not be necessary for you to call this method multiple times
You can provide the destination path where the generated files will be saved.
You also have the option to only generate the mappings for certain tables.
Options:
· Validate mappings and database
Check if the associations are defined correctly, and their mappings are in sync with the database.
You can remove all your entities before perform validating.
Options:
· Update database
Run the queries to update your database or preview them without querying.
You can remove all of your entities before upgrading.
Every time you run this command, doctrine:generate-entities
is called
Options:
· Cache clear
Sometimes you can get missing entity errors, deleting cached data can help to fix it.
Options:
· Generate migrations (for testing)
For testing purposes, you will need your project migrations. You can generate it with the following command.
By default, they will be generated in tests/database/migrations
Arguments:
Options:
Available commands for the "doctrine" namespace
You can see the arguments and options of each of them with the help command
utf8mb4
To change the character set and collation of a table, add this options
to the entity
Problems with mysql 5.7
mysql versions prior to 5.7.7 may throw an error
"Specified key was too long; max key length is 767 bytes"
You must verify that any column of type string
and unique=true
must set its maximum length="190"
Important, check the indexes
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Sergio
- Itemvirtual
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Doctrine XML Mapping documentation and examples
All versions of laravel-doctrine with dependencies
doctrine/annotations Version ^1.13
doctrine/orm Version ^2.12.3
symfony/cache Version ^6.0