Zeyad2003 commented on code in PR #4037:
URL: https://github.com/apache/fineract/pull/4037#discussion_r1736580282


##########
custom/acme/loan/job/src/main/resources/db/custom-changelog/0001_acme_loan_job.xml:
##########
@@ -42,4 +42,10 @@
             <column name="is_mismatched_job" valueBoolean="true"/>
         </insert>
     </changeSet>
+    <changeSet author="acme" id="2">
+        <update tableName="job">
+            <column name="short_name" value="ACM_NOOP"/>
+            <where>name='Acme Noop Job'</where>
+        </update>
+    </changeSet>

Review Comment:
   @adamsaghy @marta-jankovics 
   
   I am currently working on a custom module in another PR (#3994), and when I 
rebased the branch with the `develop` branch and ran the custom Docker image, I 
encountered the following error:
   
   ```sql
   fineract-fineract-1  | Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'tenantDatabaseUpgradeService' defined in URL 
[jar:file:/app/libs/fineract-provider-0.1.0-SNAPSHOT-plain.jar!/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.class]:
 liquibase.exception.CommandExecutionException: 
liquibase.exception.LiquibaseException: 
liquibase.exception.MigrationFailedException: Migration failed for changeset 
db/custom-changelog/0001_acme_loan_job.xml::1::acme:
   fineract-fineract-1  |      Reason: liquibase.exception.DatabaseException: 
ERROR: null value in column "short_name" of relation "job" violates not-null 
constraint
   fineract-fineract-1  |   Detail: Failing row contains (40, Acme Noop Job, 
Acme Noop Job, 0 1 0 1/1 * ? *, 2024-08-29 15:30:47.958143, 5, null, null, 
null, Acme Noop Job _ DEFAULT, null, f, f, t, 0, f, 1, t, null). [Failed SQL: 
(0) INSERT INTO public.job (name, display_name, cron_expression, create_time, 
task_priority, group_name, previous_run_start_time, job_key, 
initializing_errorlog, is_active, currently_running, updates_allowed, 
scheduler_group, is_misfired, node_id, is_mismatched_job) VALUES ('Acme Noop 
Job', 'Acme Noop Job', '0 1 0 1/1 * ? *', NOW(), 5, NULL, NULL, 'Acme Noop Job 
_ DEFAULT', NULL, FALSE, FALSE, TRUE, 0, FALSE, 1, TRUE)]
   ```
   
   Could you please explain why this occurred and how I can resolve it?
   
   > [!NOTE]
   > I am running 
[`docker-compose-api-v3.yml`](https://github.com/Zeyad2003/fineract/blob/c63762763f40cfb8390bdbf53a9eb6c425f63e0c/docker-compose-api-v3.yml)
 which uses **Postgres** image



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to