PHPackages                             axn/laravel-revert-db-default-string-length - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. axn/laravel-revert-db-default-string-length

ActiveLibrary[Database &amp; ORM](/categories/database)

axn/laravel-revert-db-default-string-length
===========================================

Revert database default string length to 255 characters in a Laravel project

2.0.1(8mo ago)1345MITPHPPHP ^8.2 || ^8.4

Since Dec 19Pushed 8mo ago2 watchersCompare

[ Source](https://github.com/AXN-Informatique/laravel-revert-db-default-string-length)[ Packagist](https://packagist.org/packages/axn/laravel-revert-db-default-string-length)[ Docs](https://github.com/AXN-Informatique/laravel-revert-db-default-string-length)[ RSS](/packages/axn-laravel-revert-db-default-string-length/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (7)Used By (0)

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:

```
Schema::defaultStringLength(191);
```

As a result, this package will be of great help to you to modernize an old application.

Instalation
-----------

[](#instalation)

Install the package with Composer:

```
composer require axn/laravel-revert-db-default-string-length
```

Usage
-----

[](#usage)

First create a dump of your database in case there is a problem.

### Manualy

[](#manualy)

If you want to run the command directly:

```
php artisan revert-db-default-string-length:transform
```

### With migration

[](#with-migration)

Pusblish the migration:

```
php artisan vendor:publish --tag="revert-db-default-string-length-migration"
```

So you can incorporate it into your deployment workflow with:

```
php artisan migrate

```

Remember to remove `Schema::defaultStringLength(191);` from your AppServiceProvider file.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance61

Regular maintenance activity

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~261 days

Total

5

Last Release

248d ago

Major Versions

0.0.1 → 1.0.02023-07-03

1.x-dev → 2.0.02025-10-30

PHP version history (3 changes)0.0.1PHP ^8.0

1.0.0PHP ^8.1

2.0.0PHP ^8.2 || ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1314974?v=4)[Axel Neumann](/maintainers/axn)[@axn](https://github.com/axn)

---

Top Contributors

[![forxer](https://avatars.githubusercontent.com/u/407917?v=4)](https://github.com/forxer "forxer (7 commits)")

### Embed Badge

![Health badge](/badges/axn-laravel-revert-db-default-string-length/health.svg)

```
[![Health](https://phpackages.com/badges/axn-laravel-revert-db-default-string-length/health.svg)](https://phpackages.com/packages/axn-laravel-revert-db-default-string-length)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[laravel-liberu/laravel-gedcom

A package that converts gedcom files to Eloquent models

782.5k1](/packages/laravel-liberu-laravel-gedcom)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
