定制 seanstewart/update-scripts 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

seanstewart/update-scripts

Composer 安装命令:

composer require seanstewart/update-scripts

包简介

Allows you to run scripts to update your application, just like migrations

README 文档

README

Build Status

Laravel Update Scripts

This Laravel 5 package makes it easy to run scripts that modify data in your database or perform other tasks and behaves just like migrations.

How to install

Pull the package in through Composer.

"require": {
    "seanstewart/update-scripts": "dev-master"
}

Include the service provider within app/config/app.php.

'providers' => [
    Seanstewart\UpdateScripts\UpdateScriptsServiceProvider::class
];

Then you will need to run the following command to publish the migration responsilbe for setting up the "updates" table in your database.

php artisan vendor:publish

After that, you'll need to migrate your database

php artisan migrate

How to Use

Let's say you need to run some scripts that modify content in your database. Doing this through migrations isn't a great idea as those should strictly handle changes to the database structure. Run the following command to generate a new update script:

php artisan update:make some_description_for_your_update

A file will be generated in your laravel base directory called "updates" that looks like 2016_05_15_145375_some_description_for_your_update.php (again, it works just like migrations).

When you're ready to run the update script, you'd call the command....

php artisan update:run

That's it! Updates are tracked in your database just like migrations so they don't run more than once.

Why I created this

Previously we were running updates to our database data in migrations. It just felt dirty, so we decided to build something that handles updates but works just like migrations. We're using it in production for our election building service (Election Runner) and it has made the development/updating process much easier. Hopefully others will find this as useful as we do!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固