[SHOP-32] Solve the dbmigration script conflict when the commenting module is installed Created: 05/Jun/20 Updated: 30/Mar/21 Resolved: 30/Mar/21 |
|
| Status: | Closed |
| Project: | Shop |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Adrien Manzoni | Assignee: | Riste Drangovski |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[X] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[X]*
Steps to reproduce, expected, and actual results filled
[X]*
Affected version filled
|
| Date of First Response: | |
| Epic Link: | Core |
| Description |
|
When the module is installed with the commenting module, there is a conflict of db migration script between the commenting and the shop module |
| Comments |
| Comment by Riste Drangovski [ 06/Jun/20 ] |
|
Hi @amanzoni, DB Migration/Init scripts for both modules were saved on same relative path ( ex. "dbmigration/mysql" ), so ebean's resource loader was loading wrong scripts for the second module. The easiest way to fix this issue was to prefix the resource relative paths with module name so with this changes, shop-core module scripts are located at "shop-core/dbmigraion/mysql" and commenting-core scripts are located at "commenting-core/dbmigration/mysql" and ebean's resource loader loads right scripts for each module. Please let me know if something needs improvements. Regards, |