Download the PHP package axn/laravel-pk-int-to-bigint without Composer
On this page you can find all versions of the php package axn/laravel-pk-int-to-bigint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download axn/laravel-pk-int-to-bigint
More information about axn/laravel-pk-int-to-bigint
Files in axn/laravel-pk-int-to-bigint
Package laravel-pk-int-to-bigint
Short Description Convert DB primary keys and related foreign keys type from INT to BIGINT in a Laravel project
License MIT
Homepage https://github.com/AXN-Informatique/laravel-pk-int-to-bigint
Informations about the package laravel-pk-int-to-bigint
Laravel convert primary keys INT to BIGINT
This package convert DB primary keys and related foreign keys type from INT to BIGINT in a Laravel project.
This is especially useful for old projects that need to be updated.
Indeed, since Laravel 5.8 the ID columns are by default of type BIGINT. If you install new packages that use this new "standard" you will have trouble creating the foreign keys.
As a result, this package will be of great help to you to modernize an old application.
It proceeds in 4 steps:
- introspection of the database and verification of the integrity of foreign keys (if an integrity is not respected it stops and indicates it to you)
- droping all foreign key constraints on each table
- converting INT to BIGINT on primary and foreign key columns on each table
- restoring all foreign key constraints on each table
Instalation
Install the package with Composer:
Usage
First create a dump of your database in case there is a problem.
Manualy
If you want to run the command directly:
With migration
Pusblish the migration:
So you can incorporate it into your deployment workflow with:
All versions of laravel-pk-int-to-bigint with dependencies
illuminate/support Version ^8.0 || ^9.0 || ^10.0
illuminate/database Version ^8.0 || ^9.0 || ^10.0
doctrine/dbal Version ^3.5 || ^3.6