[ 
https://issues.apache.org/jira/browse/FINERACT-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17247838#comment-17247838
 ] 

Cedric Khin commented on FINERACT-1271:
---------------------------------------

I have tried to reproduce the issue on the latest Fineract version (commit 
eabb7b08096b17aa9430869625fd5d86ed2a01bb) but without success.

I have tried the steps you mentionned, but also using a .jar file without 2FA, 
both with a fresh MySQL instance with only fineract_tenants and 
fineract_default as empty databases.

I am using Tomcat 9.0.41 on MacOS.

Could you please retry with a newly cloned Fineract repository and a fresh 
MySQL 5.7 ?

If you manage to reproduce the issue, could you identify the exact moment when 
the "DELETE" scripts are added in the schema_version tables in 
fineract_tenants/fineract_default, I am pretty sure that the new "DELETE" rows 
should not be added and that is the source of the problem.

> Migration Script Issues at the time of server startups(with 2FA enabled)
> ------------------------------------------------------------------------
>
>                 Key: FINERACT-1271
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1271
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Migration Scripts
>            Reporter: bharath gowda
>            Priority: Minor
>
> Have noticed that when we start a server with Fineract 2FA enabled.
> 1 New flyway scripts with type as 'DELETE' will be added to the Databases 
> fineract_tenants and fineract_defaults.
>  
> which are as follows 
> 1. this is into the schema table of fineract_tenants  DB
> |6|5|add schema connection 
> parameters|DELETE|V5__add_schema_connection_parameters.sql|-152366073|root|########|0|1|
>  
> 2.  this is into the schema table of fineract_defaults DB
> |379|363|mnote indexing for 
> performance|DELETE|V363__mnote_indexing_for_performance.sql|829953313|root|30-11-2020
>  20:34|0|1|
>  
> (Note that V5 and V363 scripts are already executed previously with type as 
> 'SQL' and present in the system)
> Now, when we restart the server, the system will again try to execute the 
> query in the scripts 'V363' and 'V5' and it fails as already the 
> update/insert had happened before. because of this, the server startup will 
> be a failure and we cannot log in to the application.
> Ex : error 
> Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException:  
> Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: 
> Migration V5__add_schema_connection_parameters.sql 
> failed---------------------------------------------------------SQL State  : 
> 42S21Error Code : 1060Message    : Duplicate column name 
> 'schema_connection_parameters'Location   : 
> sql/migrations/list_db/V5__add_schema_connection_parameters.sql 
>  
> Kindly add a comment if any additional details/clarifications are required
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to