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(6mo ago)1240MITPHPPHP ^8.2 || ^8.4

Since Dec 19Pushed 6mo 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 1mo 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 90% of packages

Maintenance67

Regular maintenance activity

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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

194d 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://www.gravatar.com/avatar/121384f0b2f969c933a358bb40d5cf97c85558c328e9778cb9bb60f3c6302379?d=identicon)[axn](/maintainers/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

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)

PHPackages © 2026

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