Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer install from GitHub #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About

The **MX_PhinxMigrations** module integrates [Phinx](https://phinx.org) database migrations into Magento 2 as a
The **MX_PhinxMigrations** module integrates [Phinx](https://phinx.org) database migrations into Magento 2 as a
replacement for the built-in `setup:upgrade` method of triggering schema and data changes, therefore enabling zero-downtime
deployments.

Expand All @@ -19,7 +19,7 @@ and show something like:
> Acme_Foo schema: current version - 0.2.0, required version - 0.3.0\
> Acme_Foo data: current version - 0.2.0, required version - 0.3.0

If we consider the following high level deployment process, this makes zero-downtime deployments impossible due to the fact
If we consider the following high level deployment process, this makes zero-downtime deployments impossible due to the fact
that at some point, even if just for a very short time, the code and database versions will be out of sync between steps
2 and 3:

Expand All @@ -33,10 +33,17 @@ The module is currently supported on Magento >= 2.1.

## Installing


Allow installing directly from the github:

```
$ composer config repositories.inviqa__MX_PhinxMigrations git https://github.com/inviqa/MX_PhinxMigrations
```

Add the module to the require section of the composer file:

```
$ composer require mx/module-phinx-migrations
$ composer require inviqa/MX_PhinxMigrations
```

## Enabling the module
Expand Down Expand Up @@ -129,7 +136,7 @@ If you want to undo your migration then simply execute

## Limitations

1. Upgrading Magento itself will still result in version changes in the Magento `module.xml` files, therefore zero-downtime
1. Upgrading Magento itself will still result in version changes in the Magento `module.xml` files, therefore zero-downtime
deployments are not possible in this situation.

## FAQ / troubleshooting
Expand All @@ -139,3 +146,19 @@ Q. When I run `bin/phinx create ...` it cannot find any migration paths to creat
A. In order for a migration to be created `phinx` will scan your project for `migration` folders in the paths mentioned in the
[section above](#using). Make sure you create at least one `migration` folder inside one of your Magento module's `etc` folders
and then it should work as expected.

## TODO

Repo:

https://github.com/inviqa/MX_PhinxMigrations

Should be rename like:

https://github.com/inviqa/mx_phinxmigrations

Reason: composer requirement "lower case"




2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mx/module-phinx-migrations",
"name": "inviqa/MX_PhinxMigrations",
"description": "Magento 2 module that integrates phinx DB migrations as a replacement for the default setup upgrade, therefore enabling zero downtime deployments.",
"version": "1.1.0",
"type": "magento2-module",
Expand Down