定制 jsefton/migrate-environments 二次开发

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

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

jsefton/migrate-environments

Composer 安装命令:

composer require jsefton/migrate-environments

包简介

Allows you to target additional environments to run migrations

README 文档

README

This Artisan command allows you to migrate to external or additional environments by switching out the database details in an easy to use prompt interface.

This can be useful if you external staging and production environments and need to test or run migrations against the databases.

This tool could be adapted easily to become part of a build process to automatically run, but just be wary over where you store the credentials.

The credentials are stored in a JSON file for future use within /storage/app (This should not be committed into your repository, please check your site .gitignore if it comes up).

Installation

You will need composer to install this package (get composer). Then run:

composer require jsefton/migrate-environments

Register Service Provider

Add the below into your config/app.php within providers array

JSefton\MigrateEnv\MigrateEnvironmentsProvider::class

After installation you will need to publish the config file which will allow you to specify your own list of environments. To do this run:

php artisan vendor:publish --tag=migrate-env

This will create the file config/migrate-env.php where you can configure your list of environments.

Usage

When in the CLI run the below to execute the command and begin the prompts

php artisan migrate:env

If you don't want to enter data through prompt questions, you can use arguments to pass in all the needed data. The following arguments are available:

--env[=ENV]            
--stored[=STORED]
--host[=HOST]
--database[=DATABASE]
--username[=USERNAME]
--password[=PASSWORD]
--port[=PORT]
--task[=TASK]

Full usage example with arguments:

php artisan migrate:env --env=Local --host=192.168.10.10 --database=testing --username=homestead --password=secret --task=migrate:status

If you have saved connection details then you can save time with:

php artisan migrate:env --env=Local --stored=true --task=migrate:status

You can also run extra artisan commands such as db:seed by selecting a task of custom which will then prompt for the task you want to run.

统计信息

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

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固