forked from sbodak/open-loyalty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cezary Olejarczyk
committed
Oct 24, 2018
1 parent
52aaff2
commit 25f7e7c
Showing
68 changed files
with
2,534 additions
and
738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
UPGRADE FROM 2.10 to 3.0 | ||
======================= | ||
|
||
Before you upgrade | ||
------------------ | ||
|
||
Before you start upgrading, always backup your data in case something goes wrong. | ||
|
||
1. Backup your data from PostgreSQL database | ||
|
||
`docker exec -t open_loyalty_db pg_dumpall -U openloyalty > dump.sql` | ||
|
||
2. If you have a lot of data in Elasticsearch, it's a good idea to create a snapshot to speed up process of recovering data. | ||
|
||
https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-snapshots.html | ||
|
||
If somehow you can't do a snapshot, you can always rebuild data in Elasticsearch using commands | ||
|
||
`docker exec -it open_loyalty_backend bash` | ||
|
||
`su www-data` | ||
|
||
`bin/console oloy:user:projections:purge` | ||
|
||
`bin/console oloy:utility:read-models:recreate` | ||
|
||
Note that recreating a lot of data may take a while and is not as fast as using snapshots. | ||
|
||
Upgrading to 3.0.0 | ||
------------------ | ||
|
||
1. Upgrade Open Loyalty version | ||
|
||
The first step depends on how you use Open Loyalty version. | ||
|
||
2. Login to the PHP container | ||
|
||
`docker exec -it open_loyalty_backend bash` | ||
|
||
`su www-data` | ||
|
||
3. Remove cache | ||
|
||
`rm -rf var/cache/*` | ||
|
||
4. Run migration command | ||
|
||
`phing migrate_2.10_to_3.0` | ||
|
||
Depending on how big your database is, this command may take a while. | ||
|
||
I have an older version | ||
----------------------- | ||
|
||
If you have an older version than 2.10.0 then you have to run below commands for each version. | ||
|
||
1. Upgrade to next version | ||
|
||
2. Login to the PHP container | ||
|
||
`docker exec -it open_loyalty_backend bash` | ||
|
||
`su www-data` | ||
|
||
3. Remove cache | ||
|
||
`rm -rf var/cache/*` | ||
|
||
4. Run database update | ||
|
||
`bin/console doctrine:schema:update --force` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,4 +300,4 @@ | |
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> | ||
</xliff> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,4 +296,4 @@ | |
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> | ||
</xliff> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
_defaults: | ||
autowire: true | ||
autoconfigure: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.