承接 axn/laravel-revert-db-default-string-length 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Composer 安装命令:

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

包简介

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

README 文档

README

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

Install the package with Composer:

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

Usage

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

Manualy

If you want to run the command directly:

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

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.

统计信息

  • 总下载量: 345
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固