forked from FITER1/fineract-template
-
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.
Merge pull request #1367 from fiterlatam/bug/SUP-462
SUP-462: Restrict deletion of code values in use
- Loading branch information
Showing
2 changed files
with
170 additions
and
0 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
169 changes: 169 additions & 0 deletions
169
...tenant/parts/202412101146000000_SU_462_c_client_ally_point_of_sales_UPDATE_CONSTRAINT.xml
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,169 @@ | ||
<?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 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<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"> | ||
|
||
<changeSet author="fineract" id="91"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_city_code_value"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="92"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="city_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_city_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="93"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_department_code_value"/> | ||
</changeSet> | ||
<changeSet author="fineract" id="94"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="department_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_department_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="95"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_brand_id_code_value"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="96"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="brand_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_brand_id_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="97"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_category_id_code_value"/> | ||
</changeSet> | ||
<changeSet author="fineract" id="98"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="category_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_category_id_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="99"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_segment_id_code_value"/> | ||
</changeSet> | ||
<changeSet author="fineract" id="100"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="segment_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_segment_id_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="101"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_type_id_code_value"/> | ||
</changeSet> | ||
<changeSet author="fineract" id="102"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="type_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_type_id_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
<changeSet author="fineract" id="103"> | ||
<!-- Drop the existing foreign key constraint --> | ||
<dropForeignKeyConstraint | ||
baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
constraintName="fk_state_id_code_value"/> | ||
</changeSet> | ||
<changeSet author="fineract" id="104"> | ||
<addForeignKeyConstraint baseTableSchemaName="custom" | ||
baseTableName="c_client_ally_point_of_sales" | ||
baseColumnNames="state_id" | ||
referencedTableSchemaName="public" | ||
referencedTableName="m_code_value" | ||
referencedColumnNames="id" | ||
constraintName="fk_state_id_code_value" | ||
onDelete="RESTRICT" | ||
onUpdate="RESTRICT" | ||
validate="true"/> | ||
</changeSet> | ||
|
||
|
||
</databaseChangeLog> |