{"repo":"AXN-Informatique/laravel-pk-int-to-bigint","free":true,"listed":false,"github":"https://github.com/AXN-Informatique/laravel-pk-int-to-bigint","clone":"git clone https://github.com/AXN-Informatique/laravel-pk-int-to-bigint.git","description":"Convert DB primary keys and related foreign keys type from INT to BIGINT in a Laravel project","language":"PHP","stars":19,"topics":["laravel","package","database"],"license":"MIT","category":"databases-storage","readme_excerpt":"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. Version Compatibility - Version 4.x : Laravel 12+ / PHP 8.4+ (uses native Laravel schema methods) - Version 3.x : Laravel 11 / PHP 8.2+ (uses native Laravel schema methods) ⚠️ Not compatible with Laravel 12 - Version 2.x : Laravel 8-10 / PHP 8.1+ (uses Doctrine DBAL) How it works It proceeds in 4 steps: 1. Introspection : Scans the database and verifies the integrity of foreign keys (if an integrity is not respected it stops and indicates it to you) 2. Drop constraints : Temporarily drops all foreign key constraints on each table 3. Convert columns : Converts INT to BIGINT on primary and foreign key columns on each table (preserving nullable, default values, and auto-increment settings) 4. Restore constraints : Restores all foreign key constraints on each table with their original ON DELETE/ON UPDATE actions Installation Install the package with Composer: For Laravel 11 (version 3.x): For Laravel 8-10 (version 2.x): Usage ⚠️ Important : First create a dump o","default_branch":null,"files":null,"tree":[],"storefront":"/r/AXN-Informatique","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/AXN-Informatique/laravel-pk-int-to-bigint/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}