{"id":36993602,"url":"https://github.com/jsefton/migrate-environments","last_synced_at":"2026-01-13T23:45:47.898Z","repository":{"id":57002266,"uuid":"98941279","full_name":"jsefton/migrate-environments","owner":"jsefton","description":"Allows you to target additional environments to run migrations","archived":false,"fork":false,"pushed_at":"2018-02-27T14:59:49.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-25T11:46:27.826Z","etag":null,"topics":["artisan","environments","laravel","migration","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsefton.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-01T00:20:54.000Z","updated_at":"2018-05-14T13:37:39.000Z","dependencies_parsed_at":"2022-08-21T12:10:37.482Z","dependency_job_id":null,"html_url":"https://github.com/jsefton/migrate-environments","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jsefton/migrate-environments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsefton%2Fmigrate-environments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsefton%2Fmigrate-environments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsefton%2Fmigrate-environments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsefton%2Fmigrate-environments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsefton","download_url":"https://codeload.github.com/jsefton/migrate-environments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsefton%2Fmigrate-environments/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","environments","laravel","migration","php"],"created_at":"2026-01-13T23:45:47.767Z","updated_at":"2026-01-13T23:45:47.877Z","avatar_url":"https://github.com/jsefton.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Laravel Migrate Environments\n\nThis Artisan command allows you to migrate to external or additional environments by switching out the database details in an easy to use prompt interface.\n\nThis can be useful if you external staging and production environments and need to test or run migrations against the databases.\n\nThis 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.\n\nThe 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).\n\n### Installation\n\nYou will need composer to install this package (get composer). Then run:\n\n```bash\ncomposer require jsefton/migrate-environments\n```\n\n#### Register Service Provider\n\nAdd the below into your `config/app.php` within `providers` array\n\n```\nJSefton\\MigrateEnv\\MigrateEnvironmentsProvider::class\n```\n\nAfter installation you will need to publish the config file which will allow you to specify your own list of environments. To do this run:\n\n```bash\nphp artisan vendor:publish --tag=migrate-env\n```\n\nThis will create the file `config/migrate-env.php` where you can configure your list of environments.\n\n\n### Usage\n\nWhen in the CLI run the below to execute the command and begin the prompts\n\n```bash\nphp artisan migrate:env\n```\n\nIf 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:\n\n```bash\n--env[=ENV]            \n--stored[=STORED]\n--host[=HOST]\n--database[=DATABASE]\n--username[=USERNAME]\n--password[=PASSWORD]\n--port[=PORT]\n--task[=TASK]\n```\n\nFull usage example with arguments:\n\n```bash\nphp artisan migrate:env --env=Local --host=192.168.10.10 --database=testing --username=homestead --password=secret --task=migrate:status\n```\n\nIf you have saved connection details then you can save time with:\n\n```bash\nphp artisan migrate:env --env=Local --stored=true --task=migrate:status\n```\n\nYou 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.\n\n\n\n\u003cimg src=\"https://jamie-sefton.co.uk/external/migrate-env-3.gif\" width=\"100%\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsefton%2Fmigrate-environments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsefton%2Fmigrate-environments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsefton%2Fmigrate-environments/lists"}