alimi7372/upgradetor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

alimi7372/upgradetor

最新稳定版本:v1.0.13

Composer 安装命令:

composer require alimi7372/upgradetor

包简介

a package for upgrade a application when it was live and have some change or required runnung console command

README 文档

README

A Easy way to upgrade your laravel application when the application on production mode

Install

To get started with LaravelUpgradetor, use Composer to add the package to your project's dependencies:

composer require alimi7372/upgradetor

After that you should run laravel migrate command:

php artisan migrate

Usage

You can now add new version to keep your main database records changes or run commands or command after update your project:

php artisan version:make yourVersion

For example:

php artisan version:make 1.0.0

You can write your script to run after update in versioning file on your-project-path/versions. Versioning File:

namespace Alimi7372\Upgradetor\Versions;

use Alimi7372\Upgradetor\Upgrade;

return new class extends Upgrade
{
    protected string $description = "description to explain your change";
    protected string $date = "2023-04-04 10:22";
    protected string $version = "1.0.0";

    public function up()
    {
        // TODO: Implement up() method.
    }

    public function down()
    {
        // TODO: Implement down() method.
    }
};

You have tow methods in versioning files for upgrade and downgrade . You should write your script to run and upgrade in up method and wtire script to downgrade in down method. You can set description and comment on your version in variable $description on top of versioning file.

Upgrade

For run upgrade scripts in versioning files you should run below command:

php artisan version:upgrade

You can run specific versioning upgrade script with add version at end:

php artisan version:upgrade 1.0.0

Downgrade

For run downgrade scripts in versioning files you should run below command:

php artisan version:downgrade

You can run specific versioning downgrade script with add version at end:

php artisan version:downgrade 1.0.0

❤️ Open-Source Software - Give ⭐️

I have included the awesome symfony/thanks composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run composer thanks after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)

License

Laravel-Upgradator is open-sourced software licensed under the MIT License (MIT). Please see License File for more information.

Made with ❤️

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-05-01