Download the PHP package axn/laravel-revert-db-default-string-length without Composer
On this page you can find all versions of the php package axn/laravel-revert-db-default-string-length. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download axn/laravel-revert-db-default-string-length
More information about axn/laravel-revert-db-default-string-length
Files in axn/laravel-revert-db-default-string-length
Package laravel-revert-db-default-string-length
Short Description Revert database default string length to 255 characters in a Laravel project
License MIT
Homepage https://github.com/AXN-Informatique/laravel-revert-db-default-string-length
Informations about the package laravel-revert-db-default-string-length
Laravel revert DB default string length
This package revert database default string length to 255 characters in a Laravel project. It transforms all VARCHAR(191) columns to 255 characters.
This is especially useful for old projects that need to be updated.
Indeed, since Laravel 5.4 the default charset is "utf8mb4"; charset supported by MySQL from version 5.7.7 So, if the application was not running with this version at least, you had to put in the AppServiceProvider:
As a result, this package will be of great help to you to modernize an old application.
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:
Remember to remove Schema::defaultStringLength(191); from your AppServiceProvider file.
All versions of laravel-revert-db-default-string-length with dependencies
illuminate/support Version ^11.0 || ^12.0
illuminate/database Version ^11.0 || ^12.0