merge code feature/Backend-DSC-MFA this branch date 15-05-2026
This commit is contained in:
@@ -312,4 +312,5 @@
|
||||
<include file="parts/0293_create_m_dsc_challenge.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0294_add_tfa_token_to_dsc_challenge.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0295_unique_email_mobile_on_m_appuser.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0296_unique_nominee_per_account_type.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
|
||||
|
||||
<!--
|
||||
Belt-and-braces DB constraint matching the service-level uniqueness check in
|
||||
ClientNomineeWritePlatformServiceImpl: the same person may not be linked as a nominee
|
||||
more than once per (account owner, account type). Soft-deleted rows are excluded via the
|
||||
WHERE clause so revoke + re-add stays possible.
|
||||
|
||||
Partial unique index (Postgres). If the platform ever runs on MariaDB / MySQL the WHERE
|
||||
clause must be dropped — JpaSpecification fallback in the service will still enforce the
|
||||
rule but at slightly higher cost.
|
||||
-->
|
||||
<changeSet id="0296_unique_nominee_per_account_type" author="fineract" dbms="postgresql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_client_nominee"/>
|
||||
</preConditions>
|
||||
<sql>
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uq_client_nominee_per_account_type
|
||||
ON m_client_nominee (client_id, nominee_client_id, account_type)
|
||||
WHERE is_deleted = false;
|
||||
</sql>
|
||||
<rollback>
|
||||
<sql>DROP INDEX IF EXISTS uq_client_nominee_per_account_type;</sql>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user