ALTER TABLE ar_ddrequest_lot_op ADD CONSTRAINT fk_dd_item_sell_id FOREIGN KEY (seller_id) REFERENCES crm_seller (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1250', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1839, '9:b349686c2069cefb57e3b3d8478f6ac5', 'addForeignKeyConstraint baseTableName=ar_ddrequest_lot_op, constraintName=fk_dd_item_sell_id, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1251::AndriusKarpavicius
ALTER TABLE ar_payment_gateway ADD CONSTRAINT fk_sell_id_pg FOREIGN KEY (seller_id) REFERENCES crm_seller (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1251', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1841, '9:ab1ae186cdfabc63f0d4258852e527c3', 'addForeignKeyConstraint baseTableName=ar_payment_gateway, constraintName=fk_sell_id_pg, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1252::AndriusKarpavicius
ALTER TABLE ar_account_operation ADD CONSTRAINT fk_sell_id_ao FOREIGN KEY (seller_id) REFERENCES crm_seller (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1252', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1843, '9:5823406c39525699ec9d9511b65c8686', 'addForeignKeyConstraint baseTableName=ar_account_operation, constraintName=fk_sell_id_ao, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1253::AndriusKarpavicius
ALTER TABLE ar_ddrequest_lot ADD CONSTRAINT fk_sell_id_dd_lot FOREIGN KEY (seller_id) REFERENCES crm_seller (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1253', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1845, '9:6207ac53fd62cee00f42301bc6914e73', 'addForeignKeyConstraint baseTableName=ar_ddrequest_lot, constraintName=fk_sell_id_dd_lot, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1254::AndriusKarpavicius
ALTER TABLE crm_customer_category ADD CONSTRAINT fk_crm_customer_category_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1254', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1847, '9:49b1958b11692c7b41fe699c81a4118c', 'addForeignKeyConstraint baseTableName=crm_customer_category, constraintName=fk_crm_customer_category_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1255::AndriusKarpavicius
ALTER TABLE ar_other_transaction ADD CONSTRAINT fk_ar_other_transaction_general_ledger FOREIGN KEY (general_ledger_id) REFERENCES billing_general_ledger (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1255', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1849, '9:87a2920a3a494d1a56f5676b5b86c59f', 'addForeignKeyConstraint baseTableName=ar_other_transaction, constraintName=fk_ar_other_transaction_general_ledger, referencedTableName=billing_general_ledger', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1256::AndriusKarpavicius
ALTER TABLE ar_other_transaction ADD CONSTRAINT fk_ar_other_transaction_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1256', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1851, '9:da7d93b40683e9c0c5adb948b85525f5', 'addForeignKeyConstraint baseTableName=ar_other_transaction, constraintName=fk_ar_other_transaction_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1257::AndriusKarpavicius
ALTER TABLE crm_seller ADD CONSTRAINT fk_crm_seller_general_ledger FOREIGN KEY (general_ledger_id) REFERENCES billing_general_ledger (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1257', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1853, '9:489711f09b5e35c9862796da146c41f5', 'addForeignKeyConstraint baseTableName=crm_seller, constraintName=fk_crm_seller_general_ledger, referencedTableName=billing_general_ledger', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1258::AndriusKarpavicius
ALTER TABLE ar_payment_ventilation ADD CONSTRAINT fk_ar_payment_ventilation_ar_customer_account FOREIGN KEY (customer_account_id) REFERENCES ar_customer_account (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1258', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1855, '9:d6b6b278b850a4285787fa07f81da57e', 'addForeignKeyConstraint baseTableName=ar_payment_ventilation, constraintName=fk_ar_payment_ventilation_ar_customer_account, referencedTableName=ar_customer_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1259::AndriusKarpavicius
ALTER TABLE ar_payment_ventilation ADD CONSTRAINT fk_ar_payment_ventilation_ar_other_transaction_origin FOREIGN KEY (original_ot_id) REFERENCES ar_other_transaction (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1259', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1857, '9:03ca407028e6d0f8be39252c8316451d', 'addForeignKeyConstraint baseTableName=ar_payment_ventilation, constraintName=fk_ar_payment_ventilation_ar_other_transaction_origin, referencedTableName=ar_other_transaction', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1260::AndriusKarpavicius
ALTER TABLE ar_payment_ventilation ADD CONSTRAINT fk_ar_payment_ventilation_ar_other_transaction FOREIGN KEY (new_ot_id) REFERENCES ar_other_transaction (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1260', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1859, '9:1046cd0f546a05e7ee30246eb403c4c8', 'addForeignKeyConstraint baseTableName=ar_payment_ventilation, constraintName=fk_ar_payment_ventilation_ar_other_transaction, referencedTableName=ar_other_transaction', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1261::AndriusKarpavicius
ALTER TABLE ar_payment_ventilation ADD CONSTRAINT fk_ar_payment_ventilation_ar_account_operation FOREIGN KEY (account_operation_id) REFERENCES ar_account_operation (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1261', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1861, '9:fbc6660f7f59a1a34b08b588d8b9808f', 'addForeignKeyConstraint baseTableName=ar_payment_ventilation, constraintName=fk_ar_payment_ventilation_ar_account_operation, referencedTableName=ar_account_operation', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1262::AndriusKarpavicius
ALTER TABLE wf_status ADD CONSTRAINT fk_status_generic_wf FOREIGN KEY (generic_wf_id) REFERENCES wf_generic_workflow (id) ON UPDATE CASCADE ON DELETE CASCADE;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1262', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1863, '9:a24b8e71c790382497333c63a82bcd35', 'addForeignKeyConstraint baseTableName=wf_status, constraintName=fk_status_generic_wf, referencedTableName=wf_generic_workflow', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1263::AndriusKarpavicius
ALTER TABLE ar_account_operation ADD CONSTRAINT fk_ao_subscription_id FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1263', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1865, '9:93b73e89b193dfbc596e599a54881b69', 'addForeignKeyConstraint baseTableName=ar_account_operation, constraintName=fk_ao_subscription_id, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1264::AndriusKarpavicius
ALTER TABLE dunning_document ADD CONSTRAINT fk_dunning_document_ca FOREIGN KEY (customer_account_id) REFERENCES ar_customer_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1264', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1867, '9:b6c3ab84ccd182944c6cffd74343b094', 'addForeignKeyConstraint baseTableName=dunning_document, constraintName=fk_dunning_document_ca, referencedTableName=ar_customer_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1265::AndriusKarpavicius
ALTER TABLE dunning_document ADD CONSTRAINT fk_dunning_document_subscription FOREIGN KEY (billing_subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1265', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1869, '9:84bc799efc159638c8a5437ddd280b2c', 'addForeignKeyConstraint baseTableName=dunning_document, constraintName=fk_dunning_document_subscription, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1266::AndriusKarpavicius
ALTER TABLE ar_account_operation ADD CONSTRAINT fk_ar_account_operation_dunning_document FOREIGN KEY (dunning_document_id) REFERENCES dunning_document (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1266', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1871, '9:de471b64aa1ae367cbaa10f89e064df0', 'addForeignKeyConstraint baseTableName=ar_account_operation, constraintName=fk_ar_account_operation_dunning_document, referencedTableName=dunning_document', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1267::AndriusKarpavicius
ALTER TABLE wf_generic_transition ADD CONSTRAINT fk_transition_generic_wf FOREIGN KEY (generic_wf_id) REFERENCES wf_generic_workflow (id) ON UPDATE CASCADE ON DELETE CASCADE;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1267', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1873, '9:674e676239e4a8cb6f6f8263bfb40240', 'addForeignKeyConstraint baseTableName=wf_generic_transition, constraintName=fk_transition_generic_wf, referencedTableName=wf_generic_workflow', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1268::AndriusKarpavicius
ALTER TABLE wf_generic_transition ADD CONSTRAINT fk_wf_action_script FOREIGN KEY (action_script_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1268', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1875, '9:e4f9523ec69de8e6337b208371da9dea', 'addForeignKeyConstraint baseTableName=wf_generic_transition, constraintName=fk_wf_action_script, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1269::AndriusKarpavicius
ALTER TABLE wf_instance ADD CONSTRAINT fk_instance_generic_wf FOREIGN KEY (generic_wf_id) REFERENCES wf_generic_workflow (id) ON UPDATE CASCADE ON DELETE CASCADE;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1269', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1877, '9:ca6e7af9e895e235612eec4314af7521', 'addForeignKeyConstraint baseTableName=wf_instance, constraintName=fk_instance_generic_wf, referencedTableName=wf_generic_workflow', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1270::AndriusKarpavicius
ALTER TABLE wf_instance ADD CONSTRAINT fk_instance_wf_status FOREIGN KEY (current_wf_status_id) REFERENCES wf_status (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1270', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1879, '9:c5686fac4bf46d359fd4ecadc9497c65', 'addForeignKeyConstraint baseTableName=wf_instance, constraintName=fk_instance_wf_status, referencedTableName=wf_status', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1271::AndriusKarpavicius
ALTER TABLE wf_instance_history ADD CONSTRAINT fk_history_wf_instance FOREIGN KEY (wf_instance_id) REFERENCES wf_instance (id) ON UPDATE NO ACTION ON DELETE CASCADE;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1271', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1881, '9:26b6c510ad0727f133c20e9156e5cacf', 'addForeignKeyConstraint baseTableName=wf_instance_history, constraintName=fk_history_wf_instance, referencedTableName=wf_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1272::AndriusKarpavicius
ALTER TABLE billing_invoice_type ADD CONSTRAINT fk_inv_email_template FOREIGN KEY (email_template_id) REFERENCES com_message_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1272', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1883, '9:7e2ed6462ae2d4827a45e4fd2b79760b', 'addForeignKeyConstraint baseTableName=billing_invoice_type, constraintName=fk_inv_email_template, referencedTableName=com_message_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1273::AndriusKarpavicius
ALTER TABLE billing_billing_account ADD CONSTRAINT fk_ba_email_template FOREIGN KEY (email_template_id) REFERENCES com_message_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1273', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1885, '9:50811459d384ec461d63f3263405ab3d', 'addForeignKeyConstraint baseTableName=billing_billing_account, constraintName=fk_ba_email_template, referencedTableName=com_message_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1274::AndriusKarpavicius
ALTER TABLE billing_subscription ADD CONSTRAINT fk_sub_email_template FOREIGN KEY (email_template_id) REFERENCES com_message_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1274', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1887, '9:9472046f290adda637ced90c867cd6a7', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_sub_email_template, referencedTableName=com_message_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1275::AndriusKarpavicius
ALTER TABLE ord_order ADD CONSTRAINT fk_ordr_email_template FOREIGN KEY (email_template_id) REFERENCES com_message_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1275', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1889, '9:4370da11212a41aa2a94a2256b7d13c0', 'addForeignKeyConstraint baseTableName=ord_order, constraintName=fk_ordr_email_template, referencedTableName=com_message_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1277::AndriusKarpavicius
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_wallet_operation_service_instance FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1277', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1891, '9:17e14e41526eb55d0be65f4c14cfbc71', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_wallet_operation_service_instance, referencedTableName=billing_service_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1278::AndriusKarpavicius
ALTER TABLE billing_discount_plan_instance ADD CONSTRAINT billing_discount_plan_instance_bs_fk FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1278', 'AndriusKarpavicius', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1893, '9:8938fd1878baca206a33b36f33f147e3', 'addForeignKeyConstraint baseTableName=billing_discount_plan_instance, constraintName=billing_discount_plan_instance_bs_fk, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1279::AbdelmounaimAkadid
ALTER TABLE adm_notif_email ADD CONSTRAINT fk_com_message_template FOREIGN KEY (email_template_id) REFERENCES com_message_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1279', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1895, '9:63bc2b757b9f381e4000088949afe4e9', 'addForeignKeyConstraint baseTableName=adm_notif_email, constraintName=fk_com_message_template, referencedTableName=com_message_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1280::AbdelmounaimAkadid
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_offer_template FOREIGN KEY (offer_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1280', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1897, '9:bc6ec7f8c01245044ef07289627df79f', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_offer_template, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1281::AbdelmounaimAkadid
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_offer_template FOREIGN KEY (offer_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1281', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1899, '9:29b679f2e5eba78a02d165ce506f8742', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_offer_template, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1282::AbdelmounaimAkadid
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rt_service_instance FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1282', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1901, '9:90402489292c2a4a8e513ae432a93aa1', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rt_service_instance, referencedTableName=billing_service_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1283::AbdelmounaimAkadid
ALTER TABLE billing_service_instance ADD CONSTRAINT fk_si_init_active FOREIGN KEY (calendar_init_active_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1283', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1903, '9:8fcb61ce7fea0f798e37546a43d9faa2', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_si_init_active, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1284::AbdelmounaimAkadid
ALTER TABLE billing_service_instance ADD CONSTRAINT fk_si_renew_for FOREIGN KEY (calendar_renew_for_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1284', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1905, '9:7db16ae4f121824b5a5e4c8d85c60ae2', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_si_renew_for, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1285::AbdelmounaimAkadid
ALTER TABLE cat_service_template ADD CONSTRAINT fk_st_init_active FOREIGN KEY (calendar_init_active_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1285', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1907, '9:8ddf1667594c22f9b345512755d201db', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk_st_init_active, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1286::AbdelmounaimAkadid
ALTER TABLE cat_service_template ADD CONSTRAINT fk_st_renew_for FOREIGN KEY (calendar_renew_for_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1286', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1909, '9:abcea429fe6f21d8f61b96263b63ae06', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk_st_renew_for, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1287::AbdelmounaimAkadid
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_ot_init_active FOREIGN KEY (calendar_init_active_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1287', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1911, '9:d460be4a09765d1cad9236e25c0f44b1', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_ot_init_active, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1288::AbdelmounaimAkadid
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_ot_renew_for FOREIGN KEY (calendar_renew_for_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1288', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1913, '9:7ad7dd2eaa287203e22dae4cf96c5871', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_ot_renew_for, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1289::AbdelmounaimAkadid
ALTER TABLE billing_subscription ADD CONSTRAINT fk_bs_init_active FOREIGN KEY (calendar_init_active_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1289', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1915, '9:1b2619a40fd9d3087a52feba3e1fce74', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_bs_init_active, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1290::AbdelmounaimAkadid
ALTER TABLE billing_subscription ADD CONSTRAINT fk_bs_renew_for FOREIGN KEY (calendar_renew_for_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1290', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1917, '9:3279f889d79969b69dfde18bbca02912', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_bs_renew_for, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1291::AbdelmounaimAkadid
ALTER TABLE billing_counter ADD CONSTRAINT fk_billing_counter_subscription_id FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1291', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1919, '9:e02c9041a5a630e9db9338bdb19f4ff0', 'addForeignKeyConstraint baseTableName=billing_counter, constraintName=fk_billing_counter_subscription_id, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1292::AbdelmounaimAkadid
ALTER TABLE billing_counter ADD CONSTRAINT fk_billing_counter_service_instance_id FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1292', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1921, '9:65ec08ec6adbacb6c0752d454b2cb699', 'addForeignKeyConstraint baseTableName=billing_counter, constraintName=fk_billing_counter_service_instance_id, referencedTableName=billing_service_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1293::AbdelmounaimAkadid
ALTER TABLE flat_file ADD CONSTRAINT fk_d4iavkklx1qg1ani36bari5o5i FOREIGN KEY (file_format_id) REFERENCES adm_file_format (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1293', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1923, '9:3c5aa80160335550b310554ebfe90e61', 'addForeignKeyConstraint baseTableName=flat_file, constraintName=fk_d4iavkklx1qg1ani36bari5o5i, referencedTableName=adm_file_format', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1294::AbdelmounaimAkadid
ALTER TABLE ar_accounting_writing ADD CONSTRAINT fk_accounting_writing_origin_writing FOREIGN KEY (origin_writing_id) REFERENCES ar_accounting_writing (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1294', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1925, '9:40152e9d3010f62a38f0453be09d3011', 'addForeignKeyConstraint baseTableName=ar_accounting_writing, constraintName=fk_accounting_writing_origin_writing, referencedTableName=ar_accounting_writing', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1295::AbdelmounaimAkadid
ALTER TABLE ar_accounting_writing ADD CONSTRAINT fk_accounting_writing_tax FOREIGN KEY (tax_id) REFERENCES billing_tax (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1295', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1927, '9:6e5ec16b29032b64f893ceb64a7e698d', 'addForeignKeyConstraint baseTableName=ar_accounting_writing, constraintName=fk_accounting_writing_tax, referencedTableName=billing_tax', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1296::AbdelmounaimAkadid
ALTER TABLE ar_accounting_writing ADD CONSTRAINT fk_accounting_writing_invoice_category FOREIGN KEY (invoice_category_id) REFERENCES billing_invoice_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1296', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1929, '9:ecd450a3973a873da6f1390832e6331c', 'addForeignKeyConstraint baseTableName=ar_accounting_writing, constraintName=fk_accounting_writing_invoice_category, referencedTableName=billing_invoice_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1297::AbdelmounaimAkadid
ALTER TABLE ar_accounting_writing ADD CONSTRAINT fk_accounting_writing_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1297', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1931, '9:a7d1a66c6b659b46b7928214336a1ab3', 'addForeignKeyConstraint baseTableName=ar_accounting_writing, constraintName=fk_accounting_writing_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1298::AbdelmounaimAkadid
ALTER TABLE ar_account_operation ADD CONSTRAINT fk_billing_invoice FOREIGN KEY (invoice_id) REFERENCES billing_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1298', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1933, '9:1af32ca5035129e1e1da95a1dde19f0e', 'addForeignKeyConstraint baseTableName=ar_account_operation, constraintName=fk_billing_invoice, referencedTableName=billing_invoice', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1299::AbdelmounaimAkadid
ALTER TABLE adm_file_format_file_type ADD CONSTRAINT fk_4au8lqa3bc46gks4dmpbbari4h4l6 FOREIGN KEY (file_format_id) REFERENCES adm_file_format (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1299', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1935, '9:613bc48ae6c5db37b2e74378abd00472', 'addForeignKeyConstraint baseTableName=adm_file_format_file_type, constraintName=fk_4au8lqa3bc46gks4dmpbbari4h4l6, referencedTableName=adm_file_format', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1300::AbdelmounaimAkadid
ALTER TABLE adm_file_format_file_type ADD CONSTRAINT fk_s1wxui3m4sv9x5mbyi8gpbari77hu FOREIGN KEY (file_type_id) REFERENCES adm_file_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1300', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1937, '9:1ca71c88ef9177c06734cff07722e16c', 'addForeignKeyConstraint baseTableName=adm_file_format_file_type, constraintName=fk_s1wxui3m4sv9x5mbyi8gpbari77hu, referencedTableName=adm_file_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1301::AbdelmounaimAkadid
ALTER TABLE billing_invoice ADD CONSTRAINT fk_invoice_pm FOREIGN KEY (payment_method_id) REFERENCES ar_payment_token (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1301', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1939, '9:fa71cce9c607b37374f2231d5579ca27', 'addForeignKeyConstraint baseTableName=billing_invoice, constraintName=fk_invoice_pm, referencedTableName=ar_payment_token', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1302::AbdelmounaimAkadid
ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_subscription_invoice_sub_cat FOREIGN KEY (minimum_invoice_sub_category_id) REFERENCES billing_invoice_sub_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1302', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1941, '9:9f752f1e286aa27a657785bcaefe2e6c', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_billing_subscription_invoice_sub_cat, referencedTableName=billing_invoice_sub_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1303::AbdelmounaimAkadid
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_billing_cat_offer_template_invoice_sub_cat FOREIGN KEY (minimum_invoice_sub_category_id) REFERENCES billing_invoice_sub_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1303', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1943, '9:94f866e5169f94cb61cff0f1a908d076', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_billing_cat_offer_template_invoice_sub_cat, referencedTableName=billing_invoice_sub_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1304::AbdelmounaimAkadid
ALTER TABLE billing_billing_account ADD CONSTRAINT fk_billing_billing_account_invoice_sub_cat FOREIGN KEY (minimum_invoice_sub_category_id) REFERENCES billing_invoice_sub_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1304', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1945, '9:6114a3d021e51417b2de0beb2f6ff8dd', 'addForeignKeyConstraint baseTableName=billing_billing_account, constraintName=fk_billing_billing_account_invoice_sub_cat, referencedTableName=billing_invoice_sub_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1305::AbdelmounaimAkadid
ALTER TABLE billing_service_instance ADD CONSTRAINT fk_billing_service_instance_invoice_sub_cat FOREIGN KEY (minimum_invoice_sub_category_id) REFERENCES billing_invoice_sub_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1305', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1947, '9:3277a8117df08543d5987befa73b5b5d', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_billing_service_instance_invoice_sub_cat, referencedTableName=billing_invoice_sub_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1306::AbdelmounaimAkadid
ALTER TABLE cat_service_template ADD CONSTRAINT fk_billing_cat_service_template_invoice_sub_cat FOREIGN KEY (minimum_invoice_sub_category_id) REFERENCES billing_invoice_sub_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1306', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1949, '9:1d40659ee0ea701cb47bc3bcff3a02fe', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk_billing_cat_service_template_invoice_sub_cat, referencedTableName=billing_invoice_sub_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1307::AbdelmounaimAkadid
ALTER TABLE cat_serv_usage_charge_template ADD CONSTRAINT fk_443th9siwouj4fg746sgyfqtv FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1307', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1951, '9:786e0bb969b206f7e9aa03740d43f794', 'addForeignKeyConstraint baseTableName=cat_serv_usage_charge_template, constraintName=fk_443th9siwouj4fg746sgyfqtv, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1308::AbdelmounaimAkadid
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_ailcl9mls5y7bjr9yur52767h FOREIGN KEY (calendar_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1308', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1953, '9:89b9ae8beb46645001d88f8c20b682da', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_ailcl9mls5y7bjr9yur52767h, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1309::AbdelmounaimAkadid
ALTER TABLE cat_serv_rec_charge_template ADD CONSTRAINT fk_foohp8o0xupxmxcwblexcfqpp FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1309', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1955, '9:119575e437b66e2b953fda8daf0b4480', 'addForeignKeyConstraint baseTableName=cat_serv_rec_charge_template, constraintName=fk_foohp8o0xupxmxcwblexcfqpp, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1312::AbdelmounaimAkadid
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_cat_off_tpl_prod_chrg_tpl FOREIGN KEY (product_charge_tmpl_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1312', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1957, '9:29b70e87879bd9c2d9249b9ec08c98c3', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_cat_off_tpl_prod_chrg_tpl, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1313::AbdelmounaimAkadid
ALTER TABLE cat_product_templ_charge_templ ADD CONSTRAINT fk_prd_templ_ct_pct_id FOREIGN KEY (product_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1313', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1959, '9:5c24b0b2623fadf878e96798289d9d32', 'addForeignKeyConstraint baseTableName=cat_product_templ_charge_templ, constraintName=fk_prd_templ_ct_pct_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1314::AbdelmounaimAkadid
ALTER TABLE cat_serv_sub_charge_template ADD CONSTRAINT fk_3yhjbdockv9jvyw9iqmqlha63 FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1314', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1961, '9:e17484182fdff03b4b17bb07566075f6', 'addForeignKeyConstraint baseTableName=cat_serv_sub_charge_template, constraintName=fk_3yhjbdockv9jvyw9iqmqlha63, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1315::AbdelmounaimAkadid
ALTER TABLE cat_serv_trm_charge_template ADD CONSTRAINT fk_5ehn1daxca6x6t7pvdpuo4n6m FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1315', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1963, '9:5f64815bcd9e403a06772c13b5af8256', 'addForeignKeyConstraint baseTableName=cat_serv_trm_charge_template, constraintName=fk_5ehn1daxca6x6t7pvdpuo4n6m, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1316::AbdelmounaimAkadid
ALTER TABLE billing_charge_instance ADD CONSTRAINT fk_5q5wxh2nq7gbd9bcds59egh3e FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1316', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1965, '9:834c009426806752478839a130785e2a', 'addForeignKeyConstraint baseTableName=billing_charge_instance, constraintName=fk_5q5wxh2nq7gbd9bcds59egh3e, referencedTableName=billing_service_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1317::AbdelmounaimAkadid
ALTER TABLE billing_charge_instance ADD CONSTRAINT fk_n5h6xvrtm2a2av5jik9vr0cp5 FOREIGN KEY (counter_id) REFERENCES billing_counter (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1317', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1967, '9:acbd007c1421cfc567547dadd3845a9d', 'addForeignKeyConstraint baseTableName=billing_charge_instance, constraintName=fk_n5h6xvrtm2a2av5jik9vr0cp5, referencedTableName=billing_counter', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1318::AbdelmounaimAkadid
ALTER TABLE billing_charge_instance ADD CONSTRAINT fk_productci_prodins FOREIGN KEY (product_instance_id) REFERENCES billing_product_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1318', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1969, '9:4923dafff33ab4a7a099875ecac4c23b', 'addForeignKeyConstraint baseTableName=billing_charge_instance, constraintName=fk_productci_prodins, referencedTableName=billing_product_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1319::AbdelmounaimAkadid
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_input_cat_charge_template_cat_unit_of_measure FOREIGN KEY (input_unitofmeasure) REFERENCES cat_unit_of_measure (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1319', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1971, '9:76dd96e1e2fcb1cc5c25df0b14091f50', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_input_cat_charge_template_cat_unit_of_measure, referencedTableName=cat_unit_of_measure', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1320::AbdelmounaimAkadid
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_rating_cat_charge_template_cat_unit_of_measure FOREIGN KEY (rating_unitofmeasure) REFERENCES cat_unit_of_measure (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1320', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1973, '9:b418fde338b2b3aa2cd4512d384640be', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_rating_cat_charge_template_cat_unit_of_measure, referencedTableName=cat_unit_of_measure', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1321::AbdelmounaimAkadid
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_input_billing_wallet_operation_cat_unit_of_measure FOREIGN KEY (input_unitofmeasure) REFERENCES cat_unit_of_measure (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1321', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1975, '9:bde1921d9fc30084fd5cb92436441105', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_input_billing_wallet_operation_cat_unit_of_measure, referencedTableName=cat_unit_of_measure', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1322::AbdelmounaimAkadid
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_rating_billing_wallet_operation_cat_unit_of_measure FOREIGN KEY (rating_unitofmeasure) REFERENCES cat_unit_of_measure (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1322', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1977, '9:79836e4e1ee17ff5af5870b119b4a712', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_rating_billing_wallet_operation_cat_unit_of_measure, referencedTableName=cat_unit_of_measure', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1323::AbdelmounaimAkadid
ALTER TABLE cat_serv_trm_charge_template ADD CONSTRAINT fk_serv_trm_charge_template_counter_template FOREIGN KEY (counter_template_id) REFERENCES cat_counter_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1323', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1979, '9:39ea9f927314cb44cc791d8f95819606', 'addForeignKeyConstraint baseTableName=cat_serv_trm_charge_template, constraintName=fk_serv_trm_charge_template_counter_template, referencedTableName=cat_counter_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1324::AbdelmounaimAkadid
ALTER TABLE cat_serv_sub_charge_template ADD CONSTRAINT fk_serv_sub_charge_template_counter_template FOREIGN KEY (counter_template_id) REFERENCES cat_counter_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1324', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1981, '9:f4c896dd4db9e7e26c1904d691d87713', 'addForeignKeyConstraint baseTableName=cat_serv_sub_charge_template, constraintName=fk_serv_sub_charge_template_counter_template, referencedTableName=cat_counter_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1325::AbdelmounaimAkadid
ALTER TABLE billing_counter ADD CONSTRAINT fk_billing_counter_customer_id FOREIGN KEY (customer_id) REFERENCES crm_customer (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1325', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1983, '9:1858a4f6c06d9eaee1e724b140b53ab9', 'addForeignKeyConstraint baseTableName=billing_counter, constraintName=fk_billing_counter_customer_id, referencedTableName=crm_customer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1326::AbdelmounaimAkadid
ALTER TABLE billing_counter ADD CONSTRAINT fk_billing_counter_customer_account_id FOREIGN KEY (customer_account_id) REFERENCES ar_customer_account (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1326', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1985, '9:13baa96759925ea37e71ebc71cb7a22c', 'addForeignKeyConstraint baseTableName=billing_counter, constraintName=fk_billing_counter_customer_account_id, referencedTableName=ar_customer_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1327::AbdelmounaimAkadid
ALTER TABLE billing_tax_mapping ADD CONSTRAINT fk_billing_tax_mapping_tax_category_id FOREIGN KEY (tax_category_id) REFERENCES billing_tax_category (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1327', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1987, '9:68bc99d81c9b0f7bbe9dbdfad796cfa9', 'addForeignKeyConstraint baseTableName=billing_tax_mapping, constraintName=fk_billing_tax_mapping_tax_category_id, referencedTableName=billing_tax_category', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1328::AbdelmounaimAkadid
ALTER TABLE billing_tax_mapping ADD CONSTRAINT fk_billing_tax_mapping_tax_class_id FOREIGN KEY (tax_class_id) REFERENCES billing_tax_class (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1328', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1989, '9:16b4364dd68c84db06a8fc747d8de110', 'addForeignKeyConstraint baseTableName=billing_tax_mapping, constraintName=fk_billing_tax_mapping_tax_class_id, referencedTableName=billing_tax_class', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1329::AbdelmounaimAkadid
ALTER TABLE billing_tax_mapping ADD CONSTRAINT fk_billing_tax_mapping_seller_country_id FOREIGN KEY (seller_country_id) REFERENCES billing_trading_country (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1329', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1991, '9:4d1dc54d90b39dbce537594a5f56b20a', 'addForeignKeyConstraint baseTableName=billing_tax_mapping, constraintName=fk_billing_tax_mapping_seller_country_id, referencedTableName=billing_trading_country', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1330::AbdelmounaimAkadid
ALTER TABLE billing_tax_mapping ADD CONSTRAINT fk_billing_tax_mapping_buyer_country_id FOREIGN KEY (buyer_country_id) REFERENCES billing_trading_country (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1330', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1993, '9:25bcd48b0dd34255a142f0ef3f1e7828', 'addForeignKeyConstraint baseTableName=billing_tax_mapping, constraintName=fk_billing_tax_mapping_buyer_country_id, referencedTableName=billing_trading_country', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1331::AbdelmounaimAkadid
ALTER TABLE billing_tax_mapping ADD CONSTRAINT fk_billing_tax_mapping_tax_id FOREIGN KEY (tax_id) REFERENCES billing_tax (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1331', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1995, '9:6cc952a3be4c31d85bb6837a91b0d7aa', 'addForeignKeyConstraint baseTableName=billing_tax_mapping, constraintName=fk_billing_tax_mapping_tax_id, referencedTableName=billing_tax', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1332::AbdelmounaimAkadid
ALTER TABLE billing_tax_mapping ADD CONSTRAINT fk_billing_tax_mapping_tax_script_id FOREIGN KEY (tax_script_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1332', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1997, '9:08741652365226d65e6a393114632a10', 'addForeignKeyConstraint baseTableName=billing_tax_mapping, constraintName=fk_billing_tax_mapping_tax_script_id, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1333::AbdelmounaimAkadid
ALTER TABLE crm_customer_category ADD CONSTRAINT fk_crm_customer_category_tax_category_id FOREIGN KEY (tax_category_id) REFERENCES billing_tax_category (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1333', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 1999, '9:f11b07d6f03bcc8e03ac57b3b11df892', 'addForeignKeyConstraint baseTableName=crm_customer_category, constraintName=fk_crm_customer_category_tax_category_id, referencedTableName=billing_tax_category', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1334::AbdelmounaimAkadid
ALTER TABLE billing_billing_account ADD CONSTRAINT fk_billing_account_tax_category_id FOREIGN KEY (tax_category_id) REFERENCES billing_tax_category (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1334', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2001, '9:c9a4f3af881603ae80e87c41aa1f4f91', 'addForeignKeyConstraint baseTableName=billing_billing_account, constraintName=fk_billing_account_tax_category_id, referencedTableName=billing_tax_category', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1335::AbdelmounaimAkadid
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_cat_charge_template_tax_class_id FOREIGN KEY (tax_class_id) REFERENCES billing_tax_class (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1335', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2003, '9:83c5096458b4e71f44d57fede9252329', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_cat_charge_template_tax_class_id, referencedTableName=billing_tax_class', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1336::AbdelmounaimAkadid
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_tax_class_id FOREIGN KEY (tax_class_id) REFERENCES billing_tax_class (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1336', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2005, '9:47dd13bbf589b67116db0cbc64ccc7d5', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_tax_class_id, referencedTableName=billing_tax_class', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1337::AbdelmounaimAkadid
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_tax_class_id FOREIGN KEY (tax_class_id) REFERENCES billing_tax_class (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1337', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2007, '9:93fdab96d0474517352c2c8d50395203', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_tax_class_id, referencedTableName=billing_tax_class', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1338::AbdelmounaimAkadid
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_charge_template_rating_script_id FOREIGN KEY (rating_script_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1338', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2009, '9:ac0a754d0382fa1cf4d44832acc2a5be', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_charge_template_rating_script_id, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1339::AbdelmounaimAkadid
ALTER TABLE crm_customer ADD CONSTRAINT fk_customer_minimum_target_account_id FOREIGN KEY (minimum_target_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1339', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2011, '9:1492c10fcc9a5fb4ae7d7c5362a07313', 'addForeignKeyConstraint baseTableName=crm_customer, constraintName=fk_customer_minimum_target_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1340::AbdelmounaimAkadid
ALTER TABLE ar_customer_account ADD CONSTRAINT fk_ca_minimum_target_account_id FOREIGN KEY (minimum_target_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1340', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2013, '9:e72171a4d5e6c1d74cd3f99dab6d0d5c', 'addForeignKeyConstraint baseTableName=ar_customer_account, constraintName=fk_ca_minimum_target_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1341::AbdelmounaimAkadid
ALTER TABLE crm_seller ADD CONSTRAINT fk_seller_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE crm_customer ADD CONSTRAINT fk_cust_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_customer_account ADD CONSTRAINT fk_ca_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE billing_billing_account ADD CONSTRAINT fk_ba_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE billing_user_account ADD CONSTRAINT fk_ua_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1341', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2015, '9:06dd0b72d4a8598d22b755d5856b6632', 'addForeignKeyConstraint baseTableName=crm_seller, constraintName=fk_seller_minimum_charge_template_id, referencedTableName=cat_charge_template; addForeignKeyConstraint baseTableName=crm_customer, constraintName=fk_cust_minimum_charge_template_id, ...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1342::AbdelmounaimAkadid
ALTER TABLE billing_subscription ADD CONSTRAINT fk_su_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1342', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2017, '9:46bd1d918e90e66a77e805cf0908f8a4', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_su_minimum_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1343::AbdelmounaimAkadid
ALTER TABLE billing_service_instance ADD CONSTRAINT fk_si_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1343', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2019, '9:30992c5cf178b5511cfd406d48938537', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_si_minimum_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1344::AbdelmounaimAkadid
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_ot_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1344', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2021, '9:ad1125ea7f2706acb29000cd82b9f39f', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_ot_minimum_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1345::AbdelmounaimAkadid
ALTER TABLE cat_service_template ADD CONSTRAINT fk_st_minimum_charge_template_id FOREIGN KEY (minimum_charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1345', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2023, '9:5f8dd27b15f696dcf6535eb91f78c297', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk_st_minimum_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1346::AbdelmounaimAkadid
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_input_billing_rated_transaction_cat_unit_of_measure FOREIGN KEY (input_unitofmeasure) REFERENCES cat_unit_of_measure (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1346', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2025, '9:9b1e4f89f5d04aa62a3c44812b727e59', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_input_billing_rated_transaction_cat_unit_of_measure, referencedTableName=cat_unit_of_measure', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1347::AbdelmounaimAkadid
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rating_billing_rated_transaction_cat_unit_of_measure FOREIGN KEY (rating_unitofmeasure) REFERENCES cat_unit_of_measure (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1347', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2027, '9:e8fa6aa1c3ad9257e808fcb3b2e02344', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rating_billing_rated_transaction_cat_unit_of_measure, referencedTableName=cat_unit_of_measure', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1348::AbdelmounaimAkadid
ALTER TABLE billing_counter_period_values ADD CONSTRAINT billing_counter_period_values_counterperiod_id_fk FOREIGN KEY (counterperiod_id) REFERENCES billing_counter_period (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1348', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2029, '9:463e5da37e11f3e42fc5122ddf84540f', 'addForeignKeyConstraint baseTableName=billing_counter_period_values, constraintName=billing_counter_period_values_counterperiod_id_fk, referencedTableName=billing_counter_period', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1349::AbdelmounaimAkadid
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rt_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1349', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2031, '9:8ad08c33f19d5d54531f4c3b2a3e66c1', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rt_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1350::AbdelmounaimAkadid
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_wo_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1350', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2033, '9:44514d59caea1b4b2948279cebe98f60', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_wo_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1351::AbdelmounaimAkadid
ALTER TABLE cat_fixed_date ADD CONSTRAINT cat_fixed_date_cat_calendar_fk FOREIGN KEY (cat_calendar_id) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1351', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2035, '9:87f0ed4afd8c662e3bd8a7803f65d371', 'addForeignKeyConstraint baseTableName=cat_fixed_date, constraintName=cat_fixed_date_cat_calendar_fk, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1352::AbdelmounaimAkadid
ALTER TABLE ar_payment_schedule_tmpl ADD CONSTRAINT fk_tax_class_pst FOREIGN KEY (tax_class_id) REFERENCES billing_tax_class (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1352', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2037, '9:ea1a297fd4a7ad282486a01b712d68a1', 'addForeignKeyConstraint baseTableName=ar_payment_schedule_tmpl, constraintName=fk_tax_class_pst, referencedTableName=billing_tax_class', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1353::AbdelmounaimAkadid
ALTER TABLE wo_aggregation_settings ADD CONSTRAINT wallet_operation_filter_id_fk FOREIGN KEY (wallet_operation_filter_id) REFERENCES meveo_filter (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1353', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2039, '9:f20a687da7c54dda6832ce3c70024197', 'addForeignKeyConstraint baseTableName=wo_aggregation_settings, constraintName=wallet_operation_filter_id_fk, referencedTableName=meveo_filter', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1354::AbdelmounaimAkadid
ALTER TABLE wo_aggregation_line ADD CONSTRAINT wo_aggregation_settings_id_fk FOREIGN KEY (wo_aggregation_settings_id) REFERENCES wo_aggregation_settings (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1354', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2041, '9:566e00f8354abf53948699333bcf1323', 'addForeignKeyConstraint baseTableName=wo_aggregation_line, constraintName=wo_aggregation_settings_id_fk, referencedTableName=wo_aggregation_settings', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1356::AbdelmounaimAkadid
ALTER TABLE document ADD CONSTRAINT document_category_id_fk FOREIGN KEY (document_category_id) REFERENCES document_category (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1356', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2043, '9:cb10d16ffa770652a756cc804be817c7', 'addForeignKeyConstraint baseTableName=document, constraintName=document_category_id_fk, referencedTableName=document_category', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1359::AbdelmounaimAkadid
ALTER TABLE billing_subscription ADD CONSTRAINT fk_subscription_pm FOREIGN KEY (payment_method_id) REFERENCES ar_payment_token (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1359', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2045, '9:fd3fcdb48d5576069c04a71d34eb8f56', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_subscription_pm, referencedTableName=ar_payment_token', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1360::AbdelmounaimAkadid
ALTER TABLE billing_billing_account ADD CONSTRAINT fk_billing_account_pm FOREIGN KEY (payment_method_id) REFERENCES ar_payment_token (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1360', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2047, '9:8b5a2471755c532379533fa3f605395e', 'addForeignKeyConstraint baseTableName=billing_billing_account, constraintName=fk_billing_account_pm, referencedTableName=ar_payment_token', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1361::AbdelmounaimAkadid
ALTER TABLE ar_payment_token ADD CONSTRAINT document_ar_payment_token_id_fk FOREIGN KEY (document_id) REFERENCES document (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1361', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2049, '9:d647fea82830d2af8a1d2cafc1484a10', 'addForeignKeyConstraint baseTableName=ar_payment_token, constraintName=document_ar_payment_token_id_fk, referencedTableName=document', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1362::AbdelmounaimAkadid
ALTER TABLE job_execution_error ADD CONSTRAINT job_execution_error_job_instance_fk FOREIGN KEY (job_instance_id) REFERENCES meveo_job_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1362', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2051, '9:78514d67e50633494b59f7235e231a6c', 'addForeignKeyConstraint baseTableName=job_execution_error, constraintName=job_execution_error_job_instance_fk, referencedTableName=meveo_job_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1363::AbdelmounaimAkadid
ALTER TABLE cat_offer_allowed_offer_change ADD CONSTRAINT cat_offer_allowed_offer_change_fk1 FOREIGN KEY (offer_tmpl_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1363', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2053, '9:d425608161eec371c8245b69bc385518', 'addForeignKeyConstraint baseTableName=cat_offer_allowed_offer_change, constraintName=cat_offer_allowed_offer_change_fk1, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1364::AbdelmounaimAkadid
ALTER TABLE cat_offer_allowed_offer_change ADD CONSTRAINT cat_offer_allowed_offer_change_fk2 FOREIGN KEY (allowed_offer_change_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1364', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2055, '9:7e6107ceadb4db28e73dc28a711d7095', 'addForeignKeyConstraint baseTableName=cat_offer_allowed_offer_change, constraintName=cat_offer_allowed_offer_change_fk2, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1365::AbdelmounaimAkadid
ALTER TABLE ar_ao_payment_histories ADD CONSTRAINT fk_ao_id FOREIGN KEY (ao_id) REFERENCES ar_account_operation (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1365', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2057, '9:d0c9f348f01ff8a68b045f89b0e6b79e', 'addForeignKeyConstraint baseTableName=ar_ao_payment_histories, constraintName=fk_ao_id, referencedTableName=ar_account_operation', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1366::AbdelmounaimAkadid
ALTER TABLE ar_ao_payment_histories ADD CONSTRAINT fk_histo_id FOREIGN KEY (history_id) REFERENCES ar_payment_history (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1366', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2059, '9:2c7f6f27d1b861d5f0a34c8e8d29aaf0', 'addForeignKeyConstraint baseTableName=ar_ao_payment_histories, constraintName=fk_histo_id, referencedTableName=ar_payment_history', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1367::AbdelmounaimAkadid
ALTER TABLE wf_generic_action ADD CONSTRAINT fk_wf_generic_action_transition_id FOREIGN KEY (transition_id) REFERENCES wf_generic_transition (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1367', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2061, '9:ef2e81bb88ae39a4f9051d0d7aa7dd30', 'addForeignKeyConstraint baseTableName=wf_generic_action, constraintName=fk_wf_generic_action_transition_id, referencedTableName=wf_generic_transition', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1368::AbdelmounaimAkadid
ALTER TABLE wf_generic_action ADD CONSTRAINT fk_wf_generic_action_notification_id FOREIGN KEY (notification_id) REFERENCES adm_notification (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1368', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2063, '9:6cacef9a6f76cdf468f611ace207e38e', 'addForeignKeyConstraint baseTableName=wf_generic_action, constraintName=fk_wf_generic_action_notification_id, referencedTableName=adm_notification', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1369::AbdelmounaimAkadid
ALTER TABLE wf_generic_action ADD CONSTRAINT fk_wf_generic_action_script_id FOREIGN KEY (action_script_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1369', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2065, '9:aa4dc7574a2615b281beb8ed0686dc49', 'addForeignKeyConstraint baseTableName=wf_generic_action, constraintName=fk_wf_generic_action_script_id, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1370::AbdelmounaimAkadid
ALTER TABLE billing_billing_run ADD CONSTRAINT fk_billing_billing_run_next_billing_run FOREIGN KEY (next_billing_run_id) REFERENCES billing_billing_run (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1370', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2067, '9:6e33b25cf8178fb4a4a4db19678a81e8', 'addForeignKeyConstraint baseTableName=billing_billing_run, constraintName=fk_billing_billing_run_next_billing_run, referencedTableName=billing_billing_run', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1371::AbdelmounaimAkadid
ALTER TABLE billing_cycle ADD CONSTRAINT fk_billing_cycle_billing_run_validation_script FOREIGN KEY (billing_run_validation_script_id) REFERENCES meveo_script_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1371', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2069, '9:c388fa78e40d5b9197be14ea1a0424f5', 'addForeignKeyConstraint baseTableName=billing_cycle, constraintName=fk_billing_cycle_billing_run_validation_script, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1372::AbdelmounaimAkadid
ALTER TABLE billing_invoice_type ADD CONSTRAINT fk_billing_invoice_type_invoice_validation_script FOREIGN KEY (invoice_validation_script_id) REFERENCES meveo_script_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1372', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2071, '9:2925ddc3c1c95f85965c44321f5a9c8c', 'addForeignKeyConstraint baseTableName=billing_invoice_type, constraintName=fk_billing_invoice_type_invoice_validation_script, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1373::AbdelmounaimAkadid
ALTER TABLE adm_custom_generic_entity_code ADD CONSTRAINT fk_dm_custom_generic_entity_code_sequence_id FOREIGN KEY (sequence_id) REFERENCES generic_sequence (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1373', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2073, '9:3573fdb5152ec583678240b300a42072', 'addForeignKeyConstraint baseTableName=adm_custom_generic_entity_code, constraintName=fk_dm_custom_generic_entity_code_sequence_id, referencedTableName=generic_sequence', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1374::ZBariki
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_il_aggregate_id_f FOREIGN KEY (aggregate_id_f) REFERENCES billing_invoice_agregate (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1374', 'ZBariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2075, '9:af3fcc373e4373281102533157c9caa6', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_il_aggregate_id_f, referencedTableName=billing_invoice_agregate', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk1-8743::hichamHANINE
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rt_origin_ba FOREIGN KEY (origin_billing_account) REFERENCES billing_billing_account (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk1-8743', 'hichamHANINE', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2077, '9:76782684c31e6b1a4a4f5ea3f13cedc1', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rt_origin_ba, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk1-9442::hichamHANINE
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rt_rules_contract FOREIGN KEY (rules_contract_id) REFERENCES cpq_contract (id);

ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wa_op_rules_contract FOREIGN KEY (rules_contract_id) REFERENCES cpq_contract (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk1-9442', 'hichamHANINE', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2079, '9:406d741f15e483505b32e66dfe34588d', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rt_rules_contract, referencedTableName=cpq_contract; addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wa_op_rules_c...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1373::NabilOuachi
ALTER TABLE cat_service_template ADD CONSTRAINT "fk-product-service_template" FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1373', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2081, '9:6002444910c626a347099b66669b2e1f', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk-product-service_template, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1374::NabilOuachi
ALTER TABLE cat_service_template ADD CONSTRAINT "fk-product-offer_template" FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1374', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2083, '9:e2644656d51d1526e20a6c4eceba06c4', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk-product-offer_template, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1375::NabilOuachi
ALTER TABLE cat_service_template ADD CONSTRAINT "fk-product-grouped_service" FOREIGN KEY (grouped_service_id) REFERENCES cpq_grouped_service (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1375', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2085, '9:58ebea625592d01d72117349a79c4f2d', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk-product-grouped_service, referencedTableName=cpq_grouped_service', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1376::NabilOuachi
ALTER TABLE cat_service_template ADD CONSTRAINT "fk-product-service_type" FOREIGN KEY (service_type_id) REFERENCES cpq_service_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1376', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2087, '9:ffd53b606e99c825bcfdd6bb8d2b4b8b', 'addForeignKeyConstraint baseTableName=cat_service_template, constraintName=fk-product-service_type, referencedTableName=cpq_service_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1378::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk-product-charge_template" FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1378', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2089, '9:4e4773ac79e63870c7cd7539e215ce5e', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk-product-charge_template, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1379::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk-offer_template-charge_template" FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1379', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2091, '9:11e1fa387b448c4f45e64f3ac8eca303', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk-offer_template-charge_template, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1380::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk1-service_template-charge_template" FOREIGN KEY (service_template_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1380', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2093, '9:62b8fa76c3760119b534ca14b0187c17', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk1-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1381::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk-price_plan-charge_template" FOREIGN KEY (price_plan_matrix_id) REFERENCES cat_price_plan_matrix (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1381', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2095, '9:da38a5340f2d3f4cfadc44022d7efad9', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk-price_plan-charge_template, referencedTableName=cat_price_plan_matrix', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1382::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk2-service_template-charge_template" FOREIGN KEY (duration_service) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1382', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2097, '9:d83f74039d500133ee27d702e0b52e6a', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk2-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1383::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk-cat_calendar-charge_template" FOREIGN KEY (recurrence_calendar) REFERENCES cat_calendar (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1383', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2099, '9:8e98dedfa68d1bb738466bc8581d4ab1', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk-cat_calendar-charge_template, referencedTableName=cat_calendar', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1384::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk3-service_template-charge_template" FOREIGN KEY (calendar_service) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1384', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2101, '9:be524cf6846b63ed462cf805f08835d4', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk3-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1385::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk4-service_template-charge_template" FOREIGN KEY (usage_service_template_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1385', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2103, '9:50402a08ad607e40c76abdf534cf4065', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk4-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1386::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk5-service_template-charge_template" FOREIGN KEY (param1_service_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1386', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2105, '9:69db1f7304c3f71f351f1af6d16503b0', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk5-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1387::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk6-service_template-charge_template" FOREIGN KEY (param2_service_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1387', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2107, '9:063e1eade6c0cc3c28daa55c1f4d3155', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk6-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1389::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk12-service_template-charge_template" FOREIGN KEY (dim3_matrix_service) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1389', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2109, '9:ba2d167498e5302dac44e6baca950e7a', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk12-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1390::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk8-service_template-charge_template" FOREIGN KEY (param3_service_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1390', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2111, '9:f6ed8e225c86528edede38ccd5ddf80e', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk8-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1391::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk9-service_template-charge_template" FOREIGN KEY (param4_service_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1391', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2113, '9:be4c3c0e2318005ee32f8e6ea016eb3b', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk9-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1392::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk10-service_template-charge_template" FOREIGN KEY (dim1_matrix_service) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1392', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2115, '9:5e71797b72d0764e247dab1baab5859d', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk10-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1393::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT "fk11-service_template-charge_template" FOREIGN KEY (dim2_matrix_service) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1393', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2117, '9:27cff81f7d3edeb9982d09948e2e5d4b', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk11-service_template-charge_template, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1397::NabilOuachi
ALTER TABLE cpq_offer_template_tags ADD CONSTRAINT cpq_offer_template_tags_offer_template_id_fk FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1397', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2119, '9:7f2df6a1e7419564e603850fa2d7e26a', 'addForeignKeyConstraint baseTableName=cpq_offer_template_tags, constraintName=cpq_offer_template_tags_offer_template_id_fk, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1398::NabilOuachi
ALTER TABLE cpq_offer_template_tags ADD CONSTRAINT cpq_offer_template_tags_tag_id_fk FOREIGN KEY (tag_id) REFERENCES cpq_tag (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1398', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2121, '9:9a438b54e40d667d3469633b50ef4b8e', 'addForeignKeyConstraint baseTableName=cpq_offer_template_tags, constraintName=cpq_offer_template_tags_tag_id_fk, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1399::NabilOuachi
ALTER TABLE cpq_service_template_tags ADD CONSTRAINT cpq_service_template_tags_offer_template_id_fk FOREIGN KEY (service_template_id) REFERENCES cat_service_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1399', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2123, '9:58625884d8244143d8bd3e4d7db8dc81', 'addForeignKeyConstraint baseTableName=cpq_service_template_tags, constraintName=cpq_service_template_tags_offer_template_id_fk, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1400::NabilOuachi
ALTER TABLE cpq_service_template_tags ADD CONSTRAINT cpq_service_template_tags_tag_id_fk FOREIGN KEY (tag_id) REFERENCES cpq_tag (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1400', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2125, '9:a106e4d3994f8fbcf7200347d15c2d5c', 'addForeignKeyConstraint baseTableName=cpq_service_template_tags, constraintName=cpq_service_template_tags_tag_id_fk, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1401::NabilOuachi
ALTER TABLE cpq_product_version_services ADD CONSTRAINT fk_cpq_product_version_services_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1401', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2127, '9:983862eb197b46f8515da453462dec6c', 'addForeignKeyConstraint baseTableName=cpq_product_version_services, constraintName=fk_cpq_product_version_services_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1402::NabilOuachi
ALTER TABLE cpq_product_version_services ADD CONSTRAINT fk_cpq_product_version_services_service_template_id FOREIGN KEY (service_template_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1402', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2129, '9:f4fa1d4a560937bc14b7f3346e36799b', 'addForeignKeyConstraint baseTableName=cpq_product_version_services, constraintName=fk_cpq_product_version_services_service_template_id, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1403::NabilOuachi
ALTER TABLE cpq_quote_article_line ADD CONSTRAINT fk_cpq_quote_article_line_quote_billable_account_id FOREIGN KEY (billable_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1403', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2131, '9:18ce35864a66f3cdd2899d7d65c8cc02', 'addForeignKeyConstraint baseTableName=cpq_quote_article_line, constraintName=fk_cpq_quote_article_line_quote_billable_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1404::NabilOuachi
ALTER TABLE quote_offer ADD CONSTRAINT fk_quote_offer_offer_template_id FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1404', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2133, '9:b9c6d541070702a740480b5fd25c07f7', 'addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_quote_offer_offer_template_id, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1405::NabilOuachi
ALTER TABLE quote_offer ADD CONSTRAINT fk_quote_offer_billable_account_id FOREIGN KEY (billable_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1405', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2135, '9:c72e40a20bbde65a34a5d33460cbc9c8', 'addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_quote_offer_billable_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1406::NabilOuachi
ALTER TABLE quote_offer ADD CONSTRAINT fk_quote_offer_quote_version_id FOREIGN KEY (quote_version_id) REFERENCES cpq_quote_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1406', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2137, '9:a64668cdcbfe093730f73dae5ee4bcda', 'addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_quote_offer_quote_version_id, referencedTableName=cpq_quote_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1407::NabilOuachi
ALTER TABLE quote_offer ADD CONSTRAINT fk_quote_offer_quote_customer_service_id FOREIGN KEY (quote_customer_service_id) REFERENCES cpq_quote_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1407', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2139, '9:15f9a9469c49f9c6161ff462cde07e3e', 'addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_quote_offer_quote_customer_service_id, referencedTableName=cpq_quote_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1408::NabilOuachi
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk_cpq_quote_product_offer_quote_id FOREIGN KEY (offer_quote_id) REFERENCES quote_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1408', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2141, '9:75730181185c9dd21a747f3c44e02f29', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk_cpq_quote_product_offer_quote_id, referencedTableName=quote_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1409::NabilOuachi
ALTER TABLE cpq_offer_component ADD CONSTRAINT fk_cpq_offer_component_offer_template_id FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1409', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2143, '9:5e0455a5e30d0056a5a0804cea952bf5', 'addForeignKeyConstraint baseTableName=cpq_offer_component, constraintName=fk_cpq_offer_component_offer_template_id, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1411::NabilOuachi
ALTER TABLE cpq_attribute ADD CONSTRAINT fk_cpq_attribute_parent_attributes_id FOREIGN KEY (parent_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1411', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2145, '9:2d3e996d539018cecfe5f429244bf529', 'addForeignKeyConstraint baseTableName=cpq_attribute, constraintName=fk_cpq_attribute_parent_attributes_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1413::NabilOuachi
ALTER TABLE cpq_attribute_allowed_values ADD CONSTRAINT fk_cpq_attribute_allowed_values_attribute_type_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1413', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2147, '9:1a805edd2b1f348b8ee4200824a3014e', 'addForeignKeyConstraint baseTableName=cpq_attribute_allowed_values, constraintName=fk_cpq_attribute_allowed_values_attribute_type_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1414::NabilOuachi
ALTER TABLE cpq_product_version_attributes ADD CONSTRAINT cpq_product_version_attributes_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1414', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2149, '9:8e23561c2e69724e60a546fd00991713', 'addForeignKeyConstraint baseTableName=cpq_product_version_attributes, constraintName=cpq_product_version_attributes_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1415::NabilOuachi
ALTER TABLE cpq_product_version_attributes ADD CONSTRAINT cpq_product_version_attributes_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1415', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2151, '9:2131178ee877af08cd4f1f8542063f64', 'addForeignKeyConstraint baseTableName=cpq_product_version_attributes, constraintName=cpq_product_version_attributes_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1416::NabilOuachi
ALTER TABLE cpq_service_template_attributes ADD CONSTRAINT cpq_service_template_attributes_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1416', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2153, '9:6fa23983d90e8a19df46774fb6f6cd21', 'addForeignKeyConstraint baseTableName=cpq_service_template_attributes, constraintName=cpq_service_template_attributes_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1417::NabilOuachi
ALTER TABLE cpq_service_template_attributes ADD CONSTRAINT "cpq_service_template_attributes_serviceTemplate_id" FOREIGN KEY (service_template_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1417', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2155, '9:9386282b9746b641fbc75a238a924ff2', 'addForeignKeyConstraint baseTableName=cpq_service_template_attributes, constraintName=cpq_service_template_attributes_serviceTemplate_id, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1418::NabilOuachi
ALTER TABLE cpq_quote_lot ADD CONSTRAINT fk_cpq_quote_lot_cpq_quote_version_id FOREIGN KEY (cpq_quote_version_id) REFERENCES cpq_quote_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1418', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2157, '9:9ca6a6716cd41e0e9184b8201f470d82', 'addForeignKeyConstraint baseTableName=cpq_quote_lot, constraintName=fk_cpq_quote_lot_cpq_quote_version_id, referencedTableName=cpq_quote_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1419::NabilOuachi
ALTER TABLE cpq_quote_version ADD CONSTRAINT fk_cpq_quote_version_cpq_quote_id FOREIGN KEY (cpq_quote_id) REFERENCES cpq_quote (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1419', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2159, '9:2cd40fa1badd0795456d103fe7775489', 'addForeignKeyConstraint baseTableName=cpq_quote_version, constraintName=fk_cpq_quote_version_cpq_quote_id, referencedTableName=cpq_quote', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1420::NabilOuachi
ALTER TABLE cpq_quote ADD CONSTRAINT fk_cpq_quote_seller_id FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1420', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2161, '9:b5055a7b35d1fd9f70352b63d154a46f', 'addForeignKeyConstraint baseTableName=cpq_quote, constraintName=fk_cpq_quote_seller_id, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1421::NabilOuachi
ALTER TABLE cpq_quote ADD CONSTRAINT fk_cpq_quote_billable_account_id FOREIGN KEY (billable_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1421', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2163, '9:4424efce5519cf7bdd6941df67ebf3ff', 'addForeignKeyConstraint baseTableName=cpq_quote, constraintName=fk_cpq_quote_billable_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1422::NabilOuachi
ALTER TABLE cpq_quote ADD CONSTRAINT fk_cpq_quote_applicant_account_id FOREIGN KEY (applicant_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1422', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2165, '9:87dd780c0cba10e9ea3c520ffd56822d', 'addForeignKeyConstraint baseTableName=cpq_quote, constraintName=fk_cpq_quote_applicant_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1423::NabilOuachi
ALTER TABLE cpq_quote_version ADD CONSTRAINT fk_cpq_quote_version_contract_id FOREIGN KEY (contract_id) REFERENCES cpq_contract (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1423', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2167, '9:502c28a1d9301d61708613b69e2af102', 'addForeignKeyConstraint baseTableName=cpq_quote_version, constraintName=fk_cpq_quote_version_contract_id, referencedTableName=cpq_contract', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1424::NabilOuachi
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk_quote_version_id FOREIGN KEY (quote_version_id) REFERENCES cpq_quote_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1424', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2169, '9:bc7c8f41b8bc3e7e75569d7ce0be1451', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk_quote_version_id, referencedTableName=cpq_quote_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1425::NabilOuachi
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk_cpq_quote_product_cpq_quote_id FOREIGN KEY (cpq_quote_id) REFERENCES cpq_quote (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1425', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2171, '9:857dd62c9ce1a7f245cf76fc4dfda8a7', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk_cpq_quote_product_cpq_quote_id, referencedTableName=cpq_quote', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1426::NabilOuachi
ALTER TABLE cpq_quote_price ADD CONSTRAINT "fk_quote_price_quote_article_Line" FOREIGN KEY (quote_article_line_id) REFERENCES cpq_quote_article_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1426', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2173, '9:6abad8523ff8968ae267ab65968c51d5', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=fk_quote_price_quote_article_Line, referencedTableName=cpq_quote_article_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1427::NabilOuachi
ALTER TABLE cpq_quote_price ADD CONSTRAINT fk_quote_price_quote_version FOREIGN KEY (quote_version_id) REFERENCES cpq_quote_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1427', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2175, '9:649028169b777371d79e3f520b76e089', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=fk_quote_price_quote_version, referencedTableName=cpq_quote_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1428::NabilOuachi
ALTER TABLE cpq_quote_attribute ADD CONSTRAINT fk_cpq_quote_attribute_cpq_attribute_id FOREIGN KEY (cpq_attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1428', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2177, '9:9296b08b0a77738f8b7ec47973d63422', 'addForeignKeyConstraint baseTableName=cpq_quote_attribute, constraintName=fk_cpq_quote_attribute_cpq_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1429::NabilOuachi
ALTER TABLE cpq_quote_attribute ADD CONSTRAINT fk_cpq_quote_attribute_cpq_quote_product_id FOREIGN KEY (cpq_quote_product_id) REFERENCES cpq_quote_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1429', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2179, '9:ee98cab07f8c4939319e6faf929526da', 'addForeignKeyConstraint baseTableName=cpq_quote_attribute, constraintName=fk_cpq_quote_attribute_cpq_quote_product_id, referencedTableName=cpq_quote_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1430::NabilOuachi
ALTER TABLE cpq_offer_component_tags ADD CONSTRAINT cpq_offer_component_tags_offer_component_id_fk FOREIGN KEY (offer_component_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1430', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2181, '9:b8205592a51d9a0c741f8621a45c8872', 'addForeignKeyConstraint baseTableName=cpq_offer_component_tags, constraintName=cpq_offer_component_tags_offer_component_id_fk, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1431::NabilOuachi
ALTER TABLE cpq_offer_component_tags ADD CONSTRAINT cpq_offer_component_tags_tag_id_fk FOREIGN KEY (tag_id) REFERENCES cpq_tag (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1431', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2183, '9:6c9911f366301deb12ed2eb9c35bef81', 'addForeignKeyConstraint baseTableName=cpq_offer_component_tags, constraintName=cpq_offer_component_tags_tag_id_fk, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1432::NabilOuachi
ALTER TABLE cpq_product_version_grouped_attributes ADD CONSTRAINT cpq_product_version_grouped__attribute_id FOREIGN KEY (grouped_attributes_id) REFERENCES cpq_grouped_attributes (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1432', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2185, '9:1047dcf8d11d047b8fb6667c56fdd6b6', 'addForeignKeyConstraint baseTableName=cpq_product_version_grouped_attributes, constraintName=cpq_product_version_grouped__attribute_id, referencedTableName=cpq_grouped_attributes', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1433::NabilOuachi
ALTER TABLE cpq_product_version_grouped_attributes ADD CONSTRAINT cpq_product_version_grouped_attributes_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1433', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2187, '9:d6c3ecb3a7a5a58ff4c1e1d29722c0ed', 'addForeignKeyConstraint baseTableName=cpq_product_version_grouped_attributes, constraintName=cpq_product_version_grouped_attributes_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1434::NabilOuachi
ALTER TABLE billing_accounting_article ADD CONSTRAINT fk_billing_accounting_article_tax_class FOREIGN KEY (tax_class_id) REFERENCES billing_tax_class (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1434', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2189, '9:ba08a27b4e2fc8abd9cf18c88bc81d1f', 'addForeignKeyConstraint baseTableName=billing_accounting_article, constraintName=fk_billing_accounting_article_tax_class, referencedTableName=billing_tax_class', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1435::NabilOuachi
ALTER TABLE billing_accounting_article ADD CONSTRAINT fk_billing_accounting_article_invoice_sub_category FOREIGN KEY (invoice_sub_category_id) REFERENCES billing_invoice_sub_cat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1435', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2191, '9:ae858383e6e6082e28d21d5d1cb25216', 'addForeignKeyConstraint baseTableName=billing_accounting_article, constraintName=fk_billing_accounting_article_invoice_sub_category, referencedTableName=billing_invoice_sub_cat', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1436::NabilOuachi
ALTER TABLE billing_accounting_article ADD CONSTRAINT fk_billing_accounting_article_article_family FOREIGN KEY (article_family_id) REFERENCES billing_article_family (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1436', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2193, '9:abe2335d97d7e415f10f9cc9c4201a09', 'addForeignKeyConstraint baseTableName=billing_accounting_article, constraintName=fk_billing_accounting_article_article_family, referencedTableName=billing_article_family', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1437::NabilOuachi
ALTER TABLE billing_accounting_article ADD CONSTRAINT fk_billing_accounting_article_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1437', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2195, '9:0111134a47cacff25801e83f1ca3ea60', 'addForeignKeyConstraint baseTableName=billing_accounting_article, constraintName=fk_billing_accounting_article_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1438::NabilOuachi
ALTER TABLE billing_article_family ADD CONSTRAINT fk_billing_article_family_accounting_code FOREIGN KEY (accounting_code_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1438', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2197, '9:dc2423e2a68684d0edbdf154c38e2004', 'addForeignKeyConstraint baseTableName=billing_article_family, constraintName=fk_billing_article_family_accounting_code, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1439::NabilOuachi
ALTER TABLE billing_article_family ADD CONSTRAINT fk_billing_article_family_article_family_ref FOREIGN KEY (article_family_ref_id) REFERENCES billing_article_family (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1439', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2199, '9:01a6030a0b71acbb5ed229c7b93ff8b5', 'addForeignKeyConstraint baseTableName=billing_article_family, constraintName=fk_billing_article_family_article_family_ref, referencedTableName=billing_article_family', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1440::NabilOuachi
ALTER TABLE billing_article_mapping ADD CONSTRAINT fk_billing_article_mapping_mapping_script FOREIGN KEY (mapping_script_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1440', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2201, '9:841b36cf927992fc0beaffd81508dd01', 'addForeignKeyConstraint baseTableName=billing_article_mapping, constraintName=fk_billing_article_mapping_mapping_script, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1441::NabilOuachi
ALTER TABLE billing_article_mapping_line ADD CONSTRAINT fk_billing_article_mapping_line_article_mapping FOREIGN KEY (article_mapping_id) REFERENCES billing_article_mapping (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1441', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2203, '9:6cf399f1ae2add37f0f7c0d3d15bf4ce', 'addForeignKeyConstraint baseTableName=billing_article_mapping_line, constraintName=fk_billing_article_mapping_line_article_mapping, referencedTableName=billing_article_mapping', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1442::NabilOuachi
ALTER TABLE billing_article_mapping_line ADD CONSTRAINT fk_billing_article_mapping_line_article FOREIGN KEY (article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1442', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2205, '9:2af84ad5ed8d7fe84258cacdd72f7ddb', 'addForeignKeyConstraint baseTableName=billing_article_mapping_line, constraintName=fk_billing_article_mapping_line_article, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1443::NabilOuachi
ALTER TABLE billing_article_mapping_line ADD CONSTRAINT fk_billing_article_mapping_line_charge_template FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1443', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2207, '9:9097a2f29ef688fc4dea78d6c57ef9d4', 'addForeignKeyConstraint baseTableName=billing_article_mapping_line, constraintName=fk_billing_article_mapping_line_charge_template, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1444::NabilOuachi
ALTER TABLE billing_article_mapping_line ADD CONSTRAINT fk_billing_article_mapping_line_offer_template FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1444', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2209, '9:879f338a89847623842d0b863e907f0e', 'addForeignKeyConstraint baseTableName=billing_article_mapping_line, constraintName=fk_billing_article_mapping_line_offer_template, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1445::NabilOuachi
ALTER TABLE billing_article_mapping_line ADD CONSTRAINT fk_billing_article_mapping_line_product_template FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1445', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2211, '9:346820b21c10162acab7bda6e826104f', 'addForeignKeyConstraint baseTableName=billing_article_mapping_line, constraintName=fk_billing_article_mapping_line_product_template, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1447::NabilOuachi
ALTER TABLE billing_attribute_mapping ADD CONSTRAINT attribute_mapping_article_mapping_line_fk FOREIGN KEY (article_mapping_line_id) REFERENCES billing_article_mapping_line (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1447', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2213, '9:d3fd28ca6d9ed7e8ae3de5d000b03037', 'addForeignKeyConstraint baseTableName=billing_attribute_mapping, constraintName=attribute_mapping_article_mapping_line_fk, referencedTableName=billing_article_mapping_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1448::NabilOuachi
ALTER TABLE billing_attribute_mapping ADD CONSTRAINT attribute_mapping_attribute_fk FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1448', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2215, '9:d005932e4b2df1a1c360791147c900b3', 'addForeignKeyConstraint baseTableName=billing_attribute_mapping, constraintName=attribute_mapping_attribute_fk, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1449::NabilOuachi
ALTER TABLE cpq_billing_account_tags ADD CONSTRAINT cpq_billing_account_tags_billing_account_id_fk FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1449', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2217, '9:97dbef482739c898ae61c94fbc251586', 'addForeignKeyConstraint baseTableName=cpq_billing_account_tags, constraintName=cpq_billing_account_tags_billing_account_id_fk, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1450::NabilOuachi
ALTER TABLE cpq_billing_account_tags ADD CONSTRAINT cpq_billing_account_tags_tag_id_fk FOREIGN KEY (tag_id) REFERENCES cpq_tag (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1450', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2219, '9:efaa9aa73ae3c10fb5b67aa3e0578594', 'addForeignKeyConstraint baseTableName=cpq_billing_account_tags, constraintName=cpq_billing_account_tags_tag_id_fk, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1451::NabilOuachi
ALTER TABLE cpq_attribute_charge ADD CONSTRAINT cpq_attribute_charge_charge_id_fk FOREIGN KEY (charge_id) REFERENCES cat_charge_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1451', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2221, '9:9a26818d20ab1aceb582a9a04539afcb', 'addForeignKeyConstraint baseTableName=cpq_attribute_charge, constraintName=cpq_attribute_charge_charge_id_fk, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1452::NabilOuachi
ALTER TABLE cpq_attribute_charge ADD CONSTRAINT cpq_attribute_charge_attribute_id_fk FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1452', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2223, '9:fec84640177201277ad63933637388e9', 'addForeignKeyConstraint baseTableName=cpq_attribute_charge, constraintName=cpq_attribute_charge_attribute_id_fk, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1453::NabilOuachi
ALTER TABLE cat_discount_plan_item ADD CONSTRAINT fk__cat_discount_plan_item__accounting_article FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1453', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2225, '9:8cb56d7b8a51954645d0e9fa1d40e207', 'addForeignKeyConstraint baseTableName=cat_discount_plan_item, constraintName=fk__cat_discount_plan_item__accounting_article, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1454::NabilOuachi
ALTER TABLE quote_offer ADD CONSTRAINT fk__quote_offer__cat_discount_plan FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1454', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2227, '9:cbb2b942f1118d32f592e73b3b53f0a7', 'addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk__quote_offer__cat_discount_plan, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1455::NabilOuachi
ALTER TABLE cpq_quote_version ADD CONSTRAINT fk_cpq_quote_version_discount_plan FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1455', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2229, '9:ff09b1d75c473d0b040bacd715b0deb8', 'addForeignKeyConstraint baseTableName=cpq_quote_version, constraintName=fk_cpq_quote_version_discount_plan, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1456::NabilOuachi
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk__cpq_quote_product__cat_discount_plan FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1456', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2231, '9:b271d7cd4ff63c5c1ca6464ab981f8ad', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk__cpq_quote_product__cat_discount_plan, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1458::NabilOuachi
ALTER TABLE cpq_commercial_rule_header ADD CONSTRAINT fk_attribute_trade_rule_header FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1458', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2233, '9:4a9a0b6dfb2d967a3032914caaa9f415', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_header, constraintName=fk_attribute_trade_rule_header, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1459::NabilOuachi
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_attribute_rule_line FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1459', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2235, '9:eb0d72eefa24af5b4d1bf9db65a0751b', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_attribute_rule_line, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1460::NabilOuachi
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_grouped_attributes_commercial_rule_line FOREIGN KEY (grouped_attributes_id) REFERENCES cpq_grouped_attributes (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1460', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2237, '9:f90f06a82de68fd416596bf7150d7202', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_grouped_attributes_commercial_rule_line, referencedTableName=cpq_grouped_attributes', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1461::NabilOuachi
ALTER TABLE cpq_offer_attributes ADD CONSTRAINT fk_cpq_offer_attributes_offer_template_id FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1461', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2239, '9:4cdddb51affc021c6483568f368fa16c', 'addForeignKeyConstraint baseTableName=cpq_offer_attributes, constraintName=fk_cpq_offer_attributes_offer_template_id, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1462::NabilOuachi
ALTER TABLE cpq_offer_attributes ADD CONSTRAINT fk_cpq_offer_attributes_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1462', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2241, '9:8d0dc725e90677d6eee7d4aeb8d3260d', 'addForeignKeyConstraint baseTableName=cpq_offer_attributes, constraintName=fk_cpq_offer_attributes_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1463::NabilOuachi
ALTER TABLE cpq_commercial_order_billing_invoice ADD CONSTRAINT fk_cpq_commercial_order_billing_invoice_commercial_order_id FOREIGN KEY (commercial_order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1463', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2243, '9:785ce67f362cd9dfebcca313e69ffb39', 'addForeignKeyConstraint baseTableName=cpq_commercial_order_billing_invoice, constraintName=fk_cpq_commercial_order_billing_invoice_commercial_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1464::NabilOuachi
ALTER TABLE cpq_commercial_order_billing_invoice ADD CONSTRAINT fk_cpq_commercial_order_billing_invoice_invoice_id FOREIGN KEY (invoice_id) REFERENCES billing_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1464', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2245, '9:df859aac88d6f982ce93d30d8bcee0d9', 'addForeignKeyConstraint baseTableName=cpq_commercial_order_billing_invoice, constraintName=fk_cpq_commercial_order_billing_invoice_invoice_id, referencedTableName=billing_invoice', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1465::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_invoice_type_id FOREIGN KEY (invoice_type_id) REFERENCES billing_invoice_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1465', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2247, '9:c149c3664ecce6da4d76d4bcdf214efd', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_invoice_type_id, referencedTableName=billing_invoice_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1466::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_seller_id FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1466', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2249, '9:f710f9599860c1c4b2ac6bc20405c541', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_seller_id, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1467::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_billing_account_id FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1467', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2251, '9:01ec4c9cc6c8772d1de24fcdc5278832', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_billing_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1468::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_cpq_quote_id FOREIGN KEY (cpq_quote_id) REFERENCES cpq_quote (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1468', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2253, '9:797e8fbdb69d0ee500af0a0859e52bd5', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_cpq_quote_id, referencedTableName=cpq_quote', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1469::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_contract_id FOREIGN KEY (contract_id) REFERENCES cpq_contract (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1469', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2255, '9:f4d06da66f609c86c89553e901c10009', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_contract_id, referencedTableName=cpq_contract', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1470::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_order_type_id FOREIGN KEY (order_type_id) REFERENCES cpq_order_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1470', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2257, '9:8b7d175e5efa730caa1da1d15c12463f', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_order_type_id, referencedTableName=cpq_order_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1471::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_invoicing_plan_id FOREIGN KEY (invoicing_plan_id) REFERENCES cpq_invoicing_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1471', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2259, '9:fe43ccf49fce7df02b11ee9504c1fb36', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_invoicing_plan_id, referencedTableName=cpq_invoicing_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1472::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_order_parent_id FOREIGN KEY (order_parent_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1472', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2261, '9:ff6e224a67c8dd4cabefabbe264c7ff4', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_order_parent_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1473::NabilOuachi
ALTER TABLE cpq_order_attribute ADD CONSTRAINT fk_cpq_order_lot_order_id FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1473', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2263, '9:a68cb441bd2009314f56910510e6f141', 'addForeignKeyConstraint baseTableName=cpq_order_attribute, constraintName=fk_cpq_order_lot_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1474::NabilOuachi
ALTER TABLE cpq_order_attribute ADD CONSTRAINT fk_cpq_order_item_order_product_id FOREIGN KEY (order_product_id) REFERENCES cpq_order_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1474', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2265, '9:680323c6c29e27c58244e537a89486a6', 'addForeignKeyConstraint baseTableName=cpq_order_attribute, constraintName=fk_cpq_order_item_order_product_id, referencedTableName=cpq_order_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1475::NabilOuachi
ALTER TABLE cpq_order_attribute ADD CONSTRAINT fk_cpq_order_item_order_attribute_id FOREIGN KEY (cpq_attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1475', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2267, '9:267c180b46e9e2601859b8df6ff94ecf', 'addForeignKeyConstraint baseTableName=cpq_order_attribute, constraintName=fk_cpq_order_item_order_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1476::NabilOuachi
ALTER TABLE cpq_order_offer ADD CONSTRAINT fk_cpq_order_offer FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1476', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2269, '9:1e90c37ef987f0f0a7bc51701bc38911', 'addForeignKeyConstraint baseTableName=cpq_order_offer, constraintName=fk_cpq_order_offer, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1477::NabilOuachi
ALTER TABLE cpq_order_offer ADD CONSTRAINT fk_cpq_order_offer_template_id FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1477', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2271, '9:1ab8cf045d64f3b4d5ed2a429b8c4cf1', 'addForeignKeyConstraint baseTableName=cpq_order_offer, constraintName=fk_cpq_order_offer_template_id, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1478::NabilOuachi
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_cpq_order_product_order_id FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1478', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2273, '9:610f50623095a97de0197b8ef6b0ed1b', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_cpq_order_product_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1479::NabilOuachi
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_cpq_order_product_order_service_commercial_id FOREIGN KEY (order_service_commercial_id) REFERENCES cpq_order_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1479', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2275, '9:230155cf7817a737afd76979d56d6f21', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_cpq_order_product_order_service_commercial_id, referencedTableName=cpq_order_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1480::NabilOuachi
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_cpq_order_product_order_offer_id FOREIGN KEY (order_offer_id) REFERENCES cpq_order_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1480', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2277, '9:7ea5c086b4da7702929548ef22d2b963', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_cpq_order_product_order_offer_id, referencedTableName=cpq_order_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1481::NabilOuachi
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_cpq_order_product_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1481', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2279, '9:f38d64095b57ca921bd1cc83b8a5dfef', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_cpq_order_product_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1482::NabilOuachi
ALTER TABLE order_article_line ADD CONSTRAINT "fk_order_article_Line_order_id" FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1482', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2281, '9:fdfa7261be5b9638db1eccf3ba7c4a5f', 'addForeignKeyConstraint baseTableName=order_article_line, constraintName=fk_order_article_Line_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1483::NabilOuachi
ALTER TABLE order_article_line ADD CONSTRAINT "fk_order_article_Line_order_customer_service_id" FOREIGN KEY (order_customer_service_id) REFERENCES cpq_order_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1483', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2283, '9:6886ffbf474589ae1cb05cabc8e605e1', 'addForeignKeyConstraint baseTableName=order_article_line, constraintName=fk_order_article_Line_order_customer_service_id, referencedTableName=cpq_order_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1484::NabilOuachi
ALTER TABLE order_article_line ADD CONSTRAINT "fk_order_article_Line_accounting_article_id" FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1484', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2285, '9:2154a80243476f2df997d78224521748', 'addForeignKeyConstraint baseTableName=order_article_line, constraintName=fk_order_article_Line_accounting_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1485::NabilOuachi
ALTER TABLE order_price ADD CONSTRAINT "fk_order_price_order_article_Line" FOREIGN KEY (order_article_line_id) REFERENCES order_article_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1485', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2287, '9:7834a8b27f293d387e55177071acc30b', 'addForeignKeyConstraint baseTableName=order_price, constraintName=fk_order_price_order_article_Line, referencedTableName=order_article_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1486::NabilOuachi
ALTER TABLE order_price ADD CONSTRAINT fk_order_price_order_commercial_order FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1486', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2289, '9:311d340768f8e8285ed0ae593ba92b99', 'addForeignKeyConstraint baseTableName=order_price, constraintName=fk_order_price_order_commercial_order, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1487::NabilOuachi
ALTER TABLE cpq_order_invoice_access_point_list ADD CONSTRAINT fk_cpq_order_invoice_access_point_list_order_invoice_id FOREIGN KEY (order_invoice_id) REFERENCES cpq_order_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1487', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2291, '9:6c116e793e93dc2e275e08ee3de1c209', 'addForeignKeyConstraint baseTableName=cpq_order_invoice_access_point_list, constraintName=fk_cpq_order_invoice_access_point_list_order_invoice_id, referencedTableName=cpq_order_invoice', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1488::NabilOuachi
ALTER TABLE cpq_order_invoice_order_ref_list ADD CONSTRAINT fk_cpq_order_invoice_order_ref_list_order_invoice_id FOREIGN KEY (order_invoice_id) REFERENCES cpq_order_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1488', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2293, '9:447c0424a7c5093514ff7f0a00976845', 'addForeignKeyConstraint baseTableName=cpq_order_invoice_order_ref_list, constraintName=fk_cpq_order_invoice_order_ref_list_order_invoice_id, referencedTableName=cpq_order_invoice', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1489::NabilOuachi
ALTER TABLE cpq_order_invoice ADD CONSTRAINT fk_cpq_order_invoice_seller_id FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1489', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2295, '9:9d367c8d1759ec58043cc35e9191b1c6', 'addForeignKeyConstraint baseTableName=cpq_order_invoice, constraintName=fk_cpq_order_invoice_seller_id, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1490::NabilOuachi
ALTER TABLE cpq_order_invoice ADD CONSTRAINT fk_cpq_order_invoice_billing_account_id FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1490', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2297, '9:9254138c50a56d53c237b8eba58cd316', 'addForeignKeyConstraint baseTableName=cpq_order_invoice, constraintName=fk_cpq_order_invoice_billing_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1590::NabilOuachi
ALTER TABLE cpq_order_invoice ADD CONSTRAINT fk_cpq_order_invoice_invoice_type_id FOREIGN KEY (invoice_type_id) REFERENCES billing_invoice_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1590', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2299, '9:b8a76b6db44a70db6b9cb059f06dbdaf', 'addForeignKeyConstraint baseTableName=cpq_order_invoice, constraintName=fk_cpq_order_invoice_invoice_type_id, referencedTableName=billing_invoice_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1491::NabilOuachi
ALTER TABLE cpq_order_invoice ADD CONSTRAINT fk_cpq_order_invoice_commercial_order_id FOREIGN KEY (commercial_order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1491', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2301, '9:7070fc64def4311d99f81f8bb7c68003', 'addForeignKeyConstraint baseTableName=cpq_order_invoice, constraintName=fk_cpq_order_invoice_commercial_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1492::NabilOuachi
ALTER TABLE cpq_order_invoice ADD CONSTRAINT fk_cpq_order_invoice_payment_method_id FOREIGN KEY (payment_method_id) REFERENCES ar_payment_token (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1492', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2303, '9:afa1f5dec2a7a44e4bc9ce58f9bae8bb', 'addForeignKeyConstraint baseTableName=cpq_order_invoice, constraintName=fk_cpq_order_invoice_payment_method_id, referencedTableName=ar_payment_token', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1493::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_invoice_id FOREIGN KEY (invoice_id) REFERENCES billing_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1493', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2305, '9:5c716784895b218f0b68b49ee536972b', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_invoice_id, referencedTableName=billing_invoice', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-25224_20240909-rebuild::Mohammed_ElAzzouzi
ALTER TABLE billing_invoice_line ADD CONSTRAINT "fk_Invoice_line_seller_id" FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-25224_20240909-rebuild', 'Mohammed_ElAzzouzi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2307, '9:dbe5975f6de26bed0b63101cd45da374', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_Invoice_line_seller_id, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1494::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_accounting_article_id FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1494', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2309, '9:d553ca6706e15a8755ce381616a6eba6', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_accounting_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1495::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_offer_service_template_id FOREIGN KEY (offer_service_template_id) REFERENCES cat_offer_serv_templates (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1495', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2311, '9:647dc36c8c7fcc44a804d019bc33be11', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_offer_service_template_id, referencedTableName=cat_offer_serv_templates', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1496::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_product_id FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1496', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2313, '9:69b01339cf8113614bf6d60b3cbe6cd9', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_product_id, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1497::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_service_template_id FOREIGN KEY (service_template_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1497', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2315, '9:a0423fef844176b8531180ff25e823a1', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_service_template_id, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1498::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_discount_plan_id FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1498', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2317, '9:3b90363d8d7d81bb1f29b2c6e6558052', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_discount_plan_id, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1499::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_tax_id FOREIGN KEY (tax_id) REFERENCES billing_tax (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1499', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2319, '9:b5ed750e3fe3c764cbf2e571e82d27c6', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_tax_id, referencedTableName=billing_tax', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1500::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_commercial_order_id FOREIGN KEY (commercial_order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1500', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2321, '9:70d5b5593e479213edde96138345cf3e', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_commercial_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1501::NabilOuachi
ALTER TABLE cpq_invoicing_plan_item ADD CONSTRAINT fk_cpq_invoicing_plan_item_billing_plan_id FOREIGN KEY (billing_plan_id) REFERENCES cpq_invoicing_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1501', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2323, '9:5f3c939c58953e60a1c8c9c5d2036088', 'addForeignKeyConstraint baseTableName=cpq_invoicing_plan_item, constraintName=fk_cpq_invoicing_plan_item_billing_plan_id, referencedTableName=cpq_invoicing_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1502::NabilOuachi
ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_subscription_ FOREIGN KEY (commercial_order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1502', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2325, '9:53900aad218d1ec3548bb1c7c0e26640', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_billing_subscription_, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1503::NabilOuachi
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_order_id FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1503', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2327, '9:90be854223f320eb2071ffebb4ab1534', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1504::NabilOuachi
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1504', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2329, '9:8ce279b233825afe8ed7a5cd21f5fc5b', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1505::NabilOuachi
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_accounting_article_id FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1505', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2331, '9:0f9964510e818a40b262fe71783d8fc0', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_accounting_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1506::NabilOuachi
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_order_lot_id FOREIGN KEY (order_lot_id) REFERENCES cpq_order_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1506', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2333, '9:9f384ef24446d16b1868df7ce225c82f', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_order_lot_id, referencedTableName=cpq_order_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1507::NabilOuachi
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_order_id FOREIGN KEY (order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1507', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2335, '9:f61b9ca22f70143e8c6abca8bd7c9208', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1508::NabilOuachi
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1508', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2337, '9:426a8f546886bbdc9a914c5675b2ee4b', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1509::NabilOuachi
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rated_transaction_accounting_article_id FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1509', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2339, '9:dbe3610b79e4ad2fc13d86df15729e62', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rated_transaction_accounting_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1510::NabilOuachi
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rated_transaction_lot_id FOREIGN KEY (order_lot_id) REFERENCES cpq_order_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1510', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2341, '9:cee5e7635916903e730f7a4670cd02cb', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rated_transaction_lot_id, referencedTableName=cpq_order_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1511::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_column ADD CONSTRAINT fk_price_plan_matrix_column_ppm_version FOREIGN KEY (ppm_version_id) REFERENCES cpq_price_plan_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1511', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2343, '9:fa739ff2cae1d893a67f7104ce2cebed', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_column, constraintName=fk_price_plan_matrix_column_ppm_version, referencedTableName=cpq_price_plan_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1512::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_column ADD CONSTRAINT fk_price_plan_matrix_column_product FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1512', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2345, '9:7c42a1db79adf978925058b516a850d3', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_column, constraintName=fk_price_plan_matrix_column_product, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1513::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_column ADD CONSTRAINT fk_price_plan_matrix_column_attribute FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1513', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2347, '9:7d5d6e53b186a1b64dfff1fc823e0f58', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_column, constraintName=fk_price_plan_matrix_column_attribute, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1514::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_column ADD CONSTRAINT fk_price_plan_matrix_column_offer_template FOREIGN KEY (offer_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1514', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2349, '9:76c7713174633d7087a88272ab05884f', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_column, constraintName=fk_price_plan_matrix_column_offer_template, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1515::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_value ADD CONSTRAINT fk_price_plan_matrix_value_price_plan_matrix_column FOREIGN KEY (ppm_column_id) REFERENCES cpq_price_plan_matrix_column (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1515', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2351, '9:14ce6880730855dc2c81208c02f96573', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_value, constraintName=fk_price_plan_matrix_value_price_plan_matrix_column, referencedTableName=cpq_price_plan_matrix_column', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1516::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_value ADD CONSTRAINT fk_price_plan_matrix_value_price_plan_matrix_line FOREIGN KEY (ppml_id) REFERENCES cpq_price_plan_matrix_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1516', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2353, '9:a487e5a920e6aa881799da71c9a38493', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_value, constraintName=fk_price_plan_matrix_value_price_plan_matrix_line, referencedTableName=cpq_price_plan_matrix_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1517::NabilOuachi
ALTER TABLE cpq_price_plan_matrix_line ADD CONSTRAINT fk_price_plan_matrix_line_price_plan_matrix_version FOREIGN KEY (ppm_version_id) REFERENCES cpq_price_plan_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1517', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2355, '9:773fe2752d4938ad5ed9023915702e30', 'addForeignKeyConstraint baseTableName=cpq_price_plan_matrix_line, constraintName=fk_price_plan_matrix_line_price_plan_matrix_version, referencedTableName=cpq_price_plan_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1518::NabilOuachi
ALTER TABLE cpq_product_charge_template_mapping ADD CONSTRAINT fk_product_charge_template_mapping_product FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1518', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2357, '9:0700cfa13c919bfea0c50791ee0d7485', 'addForeignKeyConstraint baseTableName=cpq_product_charge_template_mapping, constraintName=fk_product_charge_template_mapping_product, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1519::NabilOuachi
ALTER TABLE cpq_product_charge_template_mapping ADD CONSTRAINT fk_product_charge_template_mapping_charge FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1519', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2359, '9:df93fcf6946dd5d4ed4f934a1a063c1e', 'addForeignKeyConstraint baseTableName=cpq_product_charge_template_mapping, constraintName=fk_product_charge_template_mapping_charge, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1520::NabilOuachi
ALTER TABLE cpq_product_charge_template_mapping ADD CONSTRAINT fk_product_charge_template_mapping_counter FOREIGN KEY (counter_template_id) REFERENCES cat_counter_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1520', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2361, '9:f94cd914adefbd44aef63011e5fa5940', 'addForeignKeyConstraint baseTableName=cpq_product_charge_template_mapping, constraintName=fk_product_charge_template_mapping_counter, referencedTableName=cat_counter_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1521::NabilOuachi
ALTER TABLE cat_product_wallet_template_1 ADD CONSTRAINT fk_cat_product_wallet_template_product_charge_template_mapping FOREIGN KEY (product_templt_id) REFERENCES cpq_product_charge_template_mapping (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1521', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2363, '9:bc21716726aa2130efccce4a733ef33e', 'addForeignKeyConstraint baseTableName=cat_product_wallet_template_1, constraintName=fk_cat_product_wallet_template_product_charge_template_mapping, referencedTableName=cpq_product_charge_template_mapping', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1522::NabilOuachi
ALTER TABLE cat_product_wallet_template_1 ADD CONSTRAINT fk_cat_product_wallet_template_product_wallet_template FOREIGN KEY (wallet_template_id) REFERENCES cat_wallet_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1522', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2365, '9:244abd0b109df46078e88d89be1e5b70', 'addForeignKeyConstraint baseTableName=cat_product_wallet_template_1, constraintName=fk_cat_product_wallet_template_product_wallet_template, referencedTableName=cat_wallet_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1523::NabilOuachi
ALTER TABLE cat_product_counter_template ADD CONSTRAINT fk_cat_product_counter_template_product_charge_template_mapping FOREIGN KEY (product_templt_id) REFERENCES cpq_product_charge_template_mapping (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1523', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2367, '9:ea2c7dc4ac81ec9c9e0b5c5fed15c6ae', 'addForeignKeyConstraint baseTableName=cat_product_counter_template, constraintName=fk_cat_product_counter_template_product_charge_template_mapping, referencedTableName=cpq_product_charge_template_mapping', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1524::NabilOuachi
ALTER TABLE cat_product_counter_template ADD CONSTRAINT fk_cat_product_counter_template_cat_counter_template FOREIGN KEY (counter_template_id) REFERENCES cat_counter_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1524', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2369, '9:e070747234d29183be970b1630cb1920', 'addForeignKeyConstraint baseTableName=cat_product_counter_template, constraintName=fk_cat_product_counter_template_cat_counter_template, referencedTableName=cat_counter_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1525::NabilOuachi
ALTER TABLE cpq_quote ADD CONSTRAINT fk_cpq_quote_invoice_type_id FOREIGN KEY (invoice_type_id) REFERENCES billing_invoice_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1525', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2371, '9:96ad52e18885c879d14c5188c0e0620d', 'addForeignKeyConstraint baseTableName=cpq_quote, constraintName=fk_cpq_quote_invoice_type_id, referencedTableName=billing_invoice_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1526::NabilOuachi
ALTER TABLE cpq_quote_article_line ADD CONSTRAINT fk_cpq_quote_article_line_quote_accounting_article_id FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1526', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2373, '9:df8e0455da70c174c52ee97667e4d308', 'addForeignKeyConstraint baseTableName=cpq_quote_article_line, constraintName=fk_cpq_quote_article_line_quote_accounting_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1529::NabilOuachi
ALTER TABLE cpq_attribute_instance ADD CONSTRAINT fk_cpq_attribute_instance_cpq_attribute_id FOREIGN KEY (cpq_attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1529', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2375, '9:94658c579c02197daa62c272bf597b3b', 'addForeignKeyConstraint baseTableName=cpq_attribute_instance, constraintName=fk_cpq_attribute_instance_cpq_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1530::NabilOuachi
ALTER TABLE cpq_attribute_instance ADD CONSTRAINT fk_cpq_attribute_instance_service_instance_id FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1530', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2377, '9:0920fc896e97214e1dab126f8ff94787', 'addForeignKeyConstraint baseTableName=cpq_attribute_instance, constraintName=fk_cpq_attribute_instance_service_instance_id, referencedTableName=billing_service_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1531::NabilOuachi
ALTER TABLE cpq_attribute_instance ADD CONSTRAINT fk_cpq_attribute_instance_subscription_id FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1531', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2379, '9:b2f666da03cdb2f15c051a8e7a419782', 'addForeignKeyConstraint baseTableName=cpq_attribute_instance, constraintName=fk_cpq_attribute_instance_subscription_id, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1532::NabilOuachi
ALTER TABLE cpq_quote_article_line ADD CONSTRAINT fk_cpq_quote_article_line_quote_product_id FOREIGN KEY (quote_product_id) REFERENCES cpq_quote_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1532', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2381, '9:4c00714c74635368a16ded5edf9b4908', 'addForeignKeyConstraint baseTableName=cpq_quote_article_line, constraintName=fk_cpq_quote_article_line_quote_product_id, referencedTableName=cpq_quote_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1533::NabilOuachi
ALTER TABLE cpq_quote_article_line ADD CONSTRAINT fk_cpq_quote_article_line_quote_lot_id FOREIGN KEY (quote_lot_id) REFERENCES cpq_quote_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1533', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2383, '9:5a6b2f7e601a21094790d3626e815d08', 'addForeignKeyConstraint baseTableName=cpq_quote_article_line, constraintName=fk_cpq_quote_article_line_quote_lot_id, referencedTableName=cpq_quote_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1534::NabilOuachi
ALTER TABLE billing_service_instance ADD CONSTRAINT "fk_cpq_product_version_serviceInstance_id" FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1534', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2385, '9:90781181f72265acc92af20b4abfe7af', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_cpq_product_version_serviceInstance_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1535::NabilOuachi
ALTER TABLE billing_service_instance ADD CONSTRAINT "fk_cpq_quote_product_serviceInstance_id" FOREIGN KEY (quote_product_id) REFERENCES cpq_quote_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1535', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2387, '9:2c2c0a17654a45be5ce672ff022692cb', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_cpq_quote_product_serviceInstance_id, referencedTableName=cpq_quote_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1536::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_access_id FOREIGN KEY (access_id) REFERENCES medina_access (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1536', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2389, '9:368c8ee9beb6783ba4305b1feb0e09d7', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_access_id, referencedTableName=medina_access', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1537::NabilOuachi
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_user_account_id FOREIGN KEY (user_account_id) REFERENCES billing_user_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1537', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2391, '9:3a1bd45763fa58dd078ee632ff81e8b1', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_user_account_id, referencedTableName=billing_user_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1538::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_invoice_line_billing_run_id_fk FOREIGN KEY (billing_run_id) REFERENCES billing_billing_run (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1538', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2393, '9:a7ddb1ed69b055792316d47d9518b23a', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_invoice_line_billing_run_id_fk, referencedTableName=billing_billing_run', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1539::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_billing_account_id_fk FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1539', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2395, '9:caedc6a1b974eee669f056e4a92690a9', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_billing_account_id_fk, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1540::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_service_instance_id_fk FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1540', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2397, '9:bd20a7171f7ced2d17cce6ec5f68983d', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_service_instance_id_fk, referencedTableName=billing_service_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1541::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_subscription_id_fk FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1541', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2399, '9:fd00528554ac12856ae0d23bcc1798e7', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_subscription_id_fk, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1542::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_offer_template_id_fk FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1542', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2401, '9:508d3ec8a704d9b3ade7c46758e1d650', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_offer_template_id_fk, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1543::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_invoice_line__order_lot__fk FOREIGN KEY (order_lot_id) REFERENCES cpq_order_lot (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1543', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2403, '9:a333fcefc8681d2b19ce8c3699204603', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_invoice_line__order_lot__fk, referencedTableName=cpq_order_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1544::NabilOuachi
ALTER TABLE billing_invoice_line ADD CONSTRAINT billing_invoice_line__product_version__fk FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1544', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2405, '9:27ac941bffcf66b523a98c5b157caf9a', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=billing_invoice_line__product_version__fk, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1545::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_cat_charge_template_attribute_id FOREIGN KEY (quantity_attribute_id) REFERENCES cpq_attribute (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1545', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2407, '9:3f1d10d1df16da63c2586aec89c8a9b3', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_cat_charge_template_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1546::NabilOuachi
ALTER TABLE cpq_quote_price ADD CONSTRAINT fk_cpq_quote_price_charge_template_id FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1546', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2409, '9:6861b83f762969fbdb66be00f5c7011a', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=fk_cpq_quote_price_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1547::NabilOuachi
ALTER TABLE order_price ADD CONSTRAINT fk_order_price_charge_template_id FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1547', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2411, '9:63f6e9cf9fa2d1aad1ecb2bb1dde634b', 'addForeignKeyConstraint baseTableName=order_price, constraintName=fk_order_price_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1548::NabilOuachi
ALTER TABLE order_article_line ADD CONSTRAINT fk_order_article_line_order_product_id FOREIGN KEY (order_product_id) REFERENCES cpq_order_product (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1548', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2413, '9:245f39ebf7fa908c277732644fff9b7f', 'addForeignKeyConstraint baseTableName=order_article_line, constraintName=fk_order_article_line_order_product_id, referencedTableName=cpq_order_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1549::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_cat_charge_templat_attribute_duration_id FOREIGN KEY (attribute_duration_id) REFERENCES cpq_attribute (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1549', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2415, '9:88a02fb78da99d99c15d34ace35a0a9e', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_cat_charge_templat_attribute_duration_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1550::NabilOuachi
ALTER TABLE cat_charge_template ADD CONSTRAINT fk_cat_charge_template_attribute_calendar_id FOREIGN KEY (attribute_calendar_id) REFERENCES cpq_attribute (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1550', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2417, '9:6e174dab5f38f68a6e2ad6c93a998828', 'addForeignKeyConstraint baseTableName=cat_charge_template, constraintName=fk_cat_charge_template_attribute_calendar_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1551::NabilOuachi
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_invoice_line_id FOREIGN KEY (invoice_line_id) REFERENCES billing_invoice_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1551', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2419, '9:e9eeb46d55af1066b6ca2c0419d1004c', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_invoice_line_id, referencedTableName=billing_invoice_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1552::NabilOuachi
ALTER TABLE cpq_product ADD CONSTRAINT fk_cpq_product_product_version_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1552', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2421, '9:8646dce2dc882564cfa3b27a5d89457f', 'addForeignKeyConstraint baseTableName=cpq_product, constraintName=fk_cpq_product_product_version_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1553::NabilOuachi
ALTER TABLE cpq_attribute_instance ADD CONSTRAINT fk_cpq_attribute_instance_parent_id FOREIGN KEY (parent_id) REFERENCES cpq_attribute_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1553', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2423, '9:d91191f9f0cdaa75682e190eebd5b249', 'addForeignKeyConstraint baseTableName=cpq_attribute_instance, constraintName=fk_cpq_attribute_instance_parent_id, referencedTableName=cpq_attribute_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1554::NabilOuachi
ALTER TABLE cpq_quote_attribute ADD CONSTRAINT fk_cpq_quote_instance_parent_id FOREIGN KEY (parent_id) REFERENCES cpq_quote_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1554', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2425, '9:ec8eaa021ba1c7cd8feb51d3f5a12b99', 'addForeignKeyConstraint baseTableName=cpq_quote_attribute, constraintName=fk_cpq_quote_instance_parent_id, referencedTableName=cpq_quote_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1555::NabilOuachi
ALTER TABLE cpq_order_attribute ADD CONSTRAINT fk_cpq_order_instance_parent_id FOREIGN KEY (parent_id) REFERENCES cpq_order_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1555', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2427, '9:efb61747b59da9eeb76863b14be3ddb1', 'addForeignKeyConstraint baseTableName=cpq_order_attribute, constraintName=fk_cpq_order_instance_parent_id, referencedTableName=cpq_order_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1556::NabilOuachi
ALTER TABLE cpq_quote_attribute ADD CONSTRAINT fk_cpq_quote_attribute_quote_offer_id FOREIGN KEY (cpq_quote_offer_id) REFERENCES quote_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1556', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2429, '9:4ca7f2aae662fc8c28c1e5f3ff813c00', 'addForeignKeyConstraint baseTableName=cpq_quote_attribute, constraintName=fk_cpq_quote_attribute_quote_offer_id, referencedTableName=quote_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1557::NabilOuachi
ALTER TABLE crm_customer ADD CONSTRAINT fk_crm_customer_iminimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1557', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2431, '9:0703e6041db1d328f5e362f799d37c83', 'addForeignKeyConstraint baseTableName=crm_customer, constraintName=fk_crm_customer_iminimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1558::NabilOuachi
ALTER TABLE ar_customer_account ADD CONSTRAINT fk_ar_customer_account_minimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1558', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2433, '9:b91e1b1abedb45f61633965571d14601', 'addForeignKeyConstraint baseTableName=ar_customer_account, constraintName=fk_ar_customer_account_minimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1559::NabilOuachi
ALTER TABLE billing_billing_account ADD CONSTRAINT fk_billing_billing_account_minimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1559', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2435, '9:bf28fc823b8287dee09ed2151791b586', 'addForeignKeyConstraint baseTableName=billing_billing_account, constraintName=fk_billing_billing_account_minimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1560::NabilOuachi
ALTER TABLE billing_user_account ADD CONSTRAINT fk_billing_user_account_minimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1560', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2437, '9:3e3405d4847c6371181587e4c3df2bed', 'addForeignKeyConstraint baseTableName=billing_user_account, constraintName=fk_billing_user_account_minimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1561::NabilOuachi
ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_subscription_minimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1561', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2439, '9:ebf1a7b0fc582e430d46432daa674159', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_billing_subscription_minimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1562::NabilOuachi
ALTER TABLE billing_service_instance ADD CONSTRAINT fk_billing_service_instance_minimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1562', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2441, '9:4ccafb18bfc90195717b883b643c8056', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_billing_service_instance_minimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1563::NabilOuachi
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_cat_offer_template_minimum_article_id FOREIGN KEY (minimum_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1563', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2443, '9:b1dd3b723a8d73f9974861380da0f37b', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_cat_offer_template_minimum_article_id, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1564::NabilOuachi
ALTER TABLE cpq_offer_template_media ADD CONSTRAINT cpq_offer_template_media_offer_template_id_fk FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1564', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2445, '9:9715f1370b543a6f0f5032fe5d644246', 'addForeignKeyConstraint baseTableName=cpq_offer_template_media, constraintName=cpq_offer_template_media_offer_template_id_fk, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1565::NabilOuachi
ALTER TABLE cpq_offer_template_media ADD CONSTRAINT cpq_offer_template_media_media_id_fk FOREIGN KEY (media_id) REFERENCES cpq_media (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1565', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2447, '9:a418bbd25afa826e0cb5b8e39355b829', 'addForeignKeyConstraint baseTableName=cpq_offer_template_media, constraintName=cpq_offer_template_media_media_id_fk, referencedTableName=cpq_media', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1566::NabilOuachi
ALTER TABLE cpq_product_media ADD CONSTRAINT cpq_product_media_product_id_fk FOREIGN KEY (product_id) REFERENCES cpq_product (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1566', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2449, '9:52434e23bd78156ec6d916f5aecf8d8a', 'addForeignKeyConstraint baseTableName=cpq_product_media, constraintName=cpq_product_media_product_id_fk, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1567::NabilOuachi
ALTER TABLE cpq_product_media ADD CONSTRAINT cpq_product_media_id_fk FOREIGN KEY (media_id) REFERENCES cpq_media (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1567', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2451, '9:4682ce38631408e317b4a9b88bbae224', 'addForeignKeyConstraint baseTableName=cpq_product_media, constraintName=cpq_product_media_id_fk, referencedTableName=cpq_media', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1568::NabilOuachi
ALTER TABLE cpq_attribute_media ADD CONSTRAINT cpq_attribute_media_attribute_id_fk FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1568', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2453, '9:fa2925cbddebdb107a4e63732cce7717', 'addForeignKeyConstraint baseTableName=cpq_attribute_media, constraintName=cpq_attribute_media_attribute_id_fk, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1569::NabilOuachi
ALTER TABLE cpq_attribute_media ADD CONSTRAINT cpq_attribute_media_id_fk FOREIGN KEY (media_id) REFERENCES cpq_media (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1569', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2455, '9:f6cae7c4d090b269dbf78dcf675132c3', 'addForeignKeyConstraint baseTableName=cpq_attribute_media, constraintName=cpq_attribute_media_id_fk, referencedTableName=cpq_media', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1570::NabilOuachi
ALTER TABLE cpq_grouped_attributes_attribute ADD CONSTRAINT fk_cpq_grouped_attributes_attribute_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1570', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2457, '9:cd9ff89b526eaa1a2b81e2f44ccc56ab', 'addForeignKeyConstraint baseTableName=cpq_grouped_attributes_attribute, constraintName=fk_cpq_grouped_attributes_attribute_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1571::NabilOuachi
ALTER TABLE cpq_grouped_attributes_attribute ADD CONSTRAINT fk_cpq_grouped_attributes_attribute_groupedattribute_id FOREIGN KEY (grouped_attributes) REFERENCES cpq_grouped_attributes (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1571', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2459, '9:95ec5e4e6de8c71ef26556119d15082b', 'addForeignKeyConstraint baseTableName=cpq_grouped_attributes_attribute, constraintName=fk_cpq_grouped_attributes_attribute_groupedattribute_id, referencedTableName=cpq_grouped_attributes', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1572::NabilOuachi
ALTER TABLE cpq_order_attribute ADD CONSTRAINT fk_cpq_order_item_cpq_order_offer_id FOREIGN KEY (cpq_order_offer_id) REFERENCES cpq_order_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1572', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2461, '9:9d508683ef874fd0433f47b52415a771', 'addForeignKeyConstraint baseTableName=cpq_order_attribute, constraintName=fk_cpq_order_item_cpq_order_offer_id, referencedTableName=cpq_order_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1573::NabilOuachi
ALTER TABLE billing_invoice ADD CONSTRAINT fk_billing_invoice_discount_plan_id FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1573', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2463, '9:ff55dd1fa6167a67f8187ab51665882c', 'addForeignKeyConstraint baseTableName=billing_invoice, constraintName=fk_billing_invoice_discount_plan_id, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1574::NabilOuachi
ALTER TABLE discount_plan_item_articles ADD CONSTRAINT discount_plan_item_articles_discount_plan_item_id_fk FOREIGN KEY (discount_plan_item_id) REFERENCES cat_discount_plan_item (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1574', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2465, '9:7d25ee1b3df843fa1061ff16c3b777e8', 'addForeignKeyConstraint baseTableName=discount_plan_item_articles, constraintName=discount_plan_item_articles_discount_plan_item_id_fk, referencedTableName=cat_discount_plan_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1575::NabilOuachi
ALTER TABLE discount_plan_item_articles ADD CONSTRAINT discount_plan_item_articles_accounting_article_id_fk FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1575', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2467, '9:bc03d231ee9f69056c7131f052f9a54e', 'addForeignKeyConstraint baseTableName=discount_plan_item_articles, constraintName=discount_plan_item_articles_accounting_article_id_fk, referencedTableName=billing_accounting_article', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1576::NabilOuachi
ALTER TABLE cpq_product_discount_plan ADD CONSTRAINT fk_cpq_product_discount_plan_product_id FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1576', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2469, '9:621e02cbd058c82ecd8bd6dfe768126e', 'addForeignKeyConstraint baseTableName=cpq_product_discount_plan, constraintName=fk_cpq_product_discount_plan_product_id, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1577::NabilOuachi
ALTER TABLE cpq_product_discount_plan ADD CONSTRAINT fk_cpq_product_discount_plan_discount_id FOREIGN KEY (discount_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1577', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2471, '9:6b81c296a6f6401c8c8b5bdfddb02640', 'addForeignKeyConstraint baseTableName=cpq_product_discount_plan, constraintName=fk_cpq_product_discount_plan_discount_id, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1578::NabilOuachi
ALTER TABLE cat_discount_plan_item ADD CONSTRAINT fk_cat_discount_plan_item_price_plan_matrix_id FOREIGN KEY (price_plan_matrix_id) REFERENCES cat_price_plan_matrix (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1578', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2473, '9:0a9f35f36f187c0f7f3c63ea0f0c6406', 'addForeignKeyConstraint baseTableName=cat_discount_plan_item, constraintName=fk_cat_discount_plan_item_price_plan_matrix_id, referencedTableName=cat_price_plan_matrix', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1579::NabilOuachi
ALTER TABLE cpq_attribute_tag ADD CONSTRAINT fk_cpq_attribute_tag_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1579', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2475, '9:5d8c160c301df3df9b467d358a4bf73f', 'addForeignKeyConstraint baseTableName=cpq_attribute_tag, constraintName=fk_cpq_attribute_tag_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1580::NabilOuachi
ALTER TABLE cpq_attribute_tag ADD CONSTRAINT fk_cpq_attribute_tag_tag_id FOREIGN KEY (tag_id) REFERENCES cpq_tag (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1580', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2477, '9:87ca4c7fd7a848e521b1f868acc861c0', 'addForeignKeyConstraint baseTableName=cpq_attribute_tag, constraintName=fk_cpq_attribute_tag_tag_id, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1581::NabilOuachi
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_cpq_order_product_discount_plan_id FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1581', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2479, '9:1d21da95dd2d1d102d29b99e1204b211', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_cpq_order_product_discount_plan_id, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1582::NabilOuachi
ALTER TABLE cpq_order_offer ADD CONSTRAINT fk_cpq_order_offer_discount_plan_id FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1582', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2481, '9:699ef2edab7dd49a213652f1d583f209', 'addForeignKeyConstraint baseTableName=cpq_order_offer, constraintName=fk_cpq_order_offer_discount_plan_id, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1583::NabilOuachi
ALTER TABLE cpq_quote_version ADD CONSTRAINT fk_cpq_quote_version_invoicing_plan_id FOREIGN KEY (invoicing_plan_id) REFERENCES cpq_invoicing_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1583', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2483, '9:609be4a4001fa81d508c874b7bbd3db5', 'addForeignKeyConstraint baseTableName=cpq_quote_version, constraintName=fk_cpq_quote_version_invoicing_plan_id, referencedTableName=cpq_invoicing_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1584::NabilOuachi
ALTER TABLE cpq_commercial_order_order_lot ADD CONSTRAINT fk_cpq_commercial_order_order_lot_commercial_order_id FOREIGN KEY (commercial_order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1584', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2485, '9:8598f293534acf9738da3ae5be5f4adb', 'addForeignKeyConstraint baseTableName=cpq_commercial_order_order_lot, constraintName=fk_cpq_commercial_order_order_lot_commercial_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1585::NabilOuachi
ALTER TABLE cpq_commercial_order_order_lot ADD CONSTRAINT fk_cpq_commercial_order_order_lot_order_lot_id FOREIGN KEY (order_lot_id) REFERENCES cpq_order_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1585', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2487, '9:132a9618f1c9bb2afc040c4b01cd656a', 'addForeignKeyConstraint baseTableName=cpq_commercial_order_order_lot, constraintName=fk_cpq_commercial_order_order_lot_order_lot_id, referencedTableName=cpq_order_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1586::NabilOuachi
ALTER TABLE crm_seller ADD CONSTRAINT fk_seller_legal_entity_type_id FOREIGN KEY (legal_entity_type_id) REFERENCES adm_title (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE crm_customer ADD CONSTRAINT fk_cust_legal_entity_type_id FOREIGN KEY (legal_entity_type_id) REFERENCES adm_title (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_customer_account ADD CONSTRAINT fk_ca_legal_entity_type_id FOREIGN KEY (legal_entity_type_id) REFERENCES adm_title (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE billing_billing_account ADD CONSTRAINT fk_ba_legal_entity_type_id FOREIGN KEY (legal_entity_type_id) REFERENCES adm_title (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE billing_user_account ADD CONSTRAINT fk_ua_legal_entity_type_id FOREIGN KEY (legal_entity_type_id) REFERENCES adm_title (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE com_contact ADD CONSTRAINT fk_com_contact_legal_entity_type_id FOREIGN KEY (legal_entity_type_id) REFERENCES adm_title (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1586', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2489, '9:5222d2644af7e640b8d4866bc2a407bf', 'addForeignKeyConstraint baseTableName=crm_seller, constraintName=fk_seller_legal_entity_type_id, referencedTableName=adm_title; addForeignKeyConstraint baseTableName=crm_customer, constraintName=fk_cust_legal_entity_type_id, referencedTableName=ad...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1587::NabilOuachi
ALTER TABLE cat_offer_template ADD CONSTRAINT offer_template_offer_template_fk FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1587', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2491, '9:52a4faf406dc6643386543cae2d8d52a', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=offer_template_offer_template_fk, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1588::NabilOuachi
ALTER TABLE billing_invoice ADD CONSTRAINT fk_billing_invoice_commercial_order_id FOREIGN KEY (commercial_order_id) REFERENCES cpq_commercial_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1588', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2493, '9:ce7d0e71f311dafb5933a016a124d8cb', 'addForeignKeyConstraint baseTableName=billing_invoice, constraintName=fk_billing_invoice_commercial_order_id, referencedTableName=cpq_commercial_order', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1589::Mbarek-Ay
ALTER TABLE cpq_product ADD CONSTRAINT fk_1y8p1q0o8tw5u0vcodfukdbez FOREIGN KEY (product_line_id) REFERENCES cpq_product_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1589', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2495, '9:28131420053d294ce27093b0e44ddc3b', 'addForeignKeyConstraint baseTableName=cpq_product, constraintName=fk_1y8p1q0o8tw5u0vcodfukdbez, referencedTableName=cpq_product_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1590::Mbarek-Ay
ALTER TABLE cpq_product ADD CONSTRAINT fk_5iap1p3o8tw5u0vcodazokdub FOREIGN KEY (customer_brand_id) REFERENCES crm_customer_brand (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1590', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2497, '9:5df1d888fbf384629f67b2a8b376de0a', 'addForeignKeyConstraint baseTableName=cpq_product, constraintName=fk_5iap1p3o8tw5u0vcodazokdub, referencedTableName=crm_customer_brand', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1591::Mbarek-Ay
ALTER TABLE cpq_product_line ADD CONSTRAINT fk_1ykj5q0o8tw5u0vcodpoqljca FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1591', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2499, '9:0fbb9998f48727c071d51663d9e4b524', 'addForeignKeyConstraint baseTableName=cpq_product_line, constraintName=fk_1ykj5q0o8tw5u0vcodpoqljca, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1592::Mbarek-Ay
ALTER TABLE cpq_tag_type ADD CONSTRAINT fk_9axk5q0o8nddo2vcodpoqlopq FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1592', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2501, '9:88ebfa86052c986950fd2bebbbe24e44', 'addForeignKeyConstraint baseTableName=cpq_tag_type, constraintName=fk_9axk5q0o8nddo2vcodpoqlopq, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1593::Mbarek-Ay
ALTER TABLE cpq_tag ADD CONSTRAINT fk_oop625q0o8tw5u0vcodospq5c FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1593', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2503, '9:6796b3a83342765e84a979ab93913134', 'addForeignKeyConstraint baseTableName=cpq_tag, constraintName=fk_oop625q0o8tw5u0vcodospq5c, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1594::Mbarek-Ay
ALTER TABLE cpq_product_line ADD CONSTRAINT fk_bnrqyk9sqqcnt5m298cpbfrqo3 FOREIGN KEY (parent_line) REFERENCES cpq_product_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1594', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2505, '9:11f0acd824889e1a9c28474b63da27f0', 'addForeignKeyConstraint baseTableName=cpq_product_line, constraintName=fk_bnrqyk9sqqcnt5m298cpbfrqo3, referencedTableName=cpq_product_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1595::Mbarek-Ay
ALTER TABLE cpq_product_version ADD CONSTRAINT fk_pomyp8vq0o8t5u0vcodpoaopq FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1595', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2507, '9:f9bd15a79d02ef8fb269b9b0fa960d7e', 'addForeignKeyConstraint baseTableName=cpq_product_version, constraintName=fk_pomyp8vq0o8t5u0vcodpoaopq, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1596::Mbarek-Ay
ALTER TABLE cpq_tag ADD CONSTRAINT fk_pomyppo52t5u0vcodpolcm FOREIGN KEY (tag_type_id) REFERENCES cpq_tag_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1596', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2509, '9:8fd6189afade25b2f2a705d43c834d13', 'addForeignKeyConstraint baseTableName=cpq_tag, constraintName=fk_pomyppo52t5u0vcodpolcm, referencedTableName=cpq_tag_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1597::Mbarek-Ay
ALTER TABLE cpq_tag ADD CONSTRAINT fk_pomjqq6n5u0vcodkopm FOREIGN KEY (parent_tag_id) REFERENCES cpq_tag (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1597', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2511, '9:1a3a9ec03d6af249fe7de30b688d8380', 'addForeignKeyConstraint baseTableName=cpq_tag, constraintName=fk_pomjqq6n5u0vcodkopm, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1598::Mbarek-Ay
ALTER TABLE cpq_offer_component ADD CONSTRAINT fk_sspl5q1jj6jdakklqp FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1598', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2513, '9:a6fed087c4847490efe507b7b22ea09e', 'addForeignKeyConstraint baseTableName=cpq_offer_component, constraintName=fk_sspl5q1jj6jdakklqp, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1599::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_iw510u1o6ndaphf4 FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1599', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2515, '9:87ca020af4bc20508cb34b63fba26646', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_iw510u1o6ndaphf4, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1600::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_ii50ihu1qzsqikh2bo FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1600', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2517, '9:f367f3d7f61c32643b628b1be6399b28', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_ii50ihu1qzsqikh2bo, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1601::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_nh50ihuoo32sqijo5v FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1601', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2519, '9:b443eafd9c1d8ece61e9a883997a1cb9', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_nh50ihuoo32sqijo5v, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1602::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_rule_item_rule_line FOREIGN KEY (commercial_rule_item_id) REFERENCES cpq_commercial_rule_item (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1602', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2521, '9:ad0f68f9a51cb6f444b68ef28b3b66d4', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_rule_item_rule_line, referencedTableName=cpq_commercial_rule_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1603::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_header ADD CONSTRAINT fk_nhi85o6nnipl087 FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1603', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2523, '9:37ad64c7940f7fe135038bb9703b4696', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_header, constraintName=fk_nhi85o6nnipl087, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1604::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_item ADD CONSTRAINT fk_commercial_rule_header_rule_item FOREIGN KEY (commercial_rule_header_id) REFERENCES cpq_commercial_rule_header (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1604', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2525, '9:0205ac5d4d21b2862267f28268f7cd13', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_item, constraintName=fk_commercial_rule_header_rule_item, referencedTableName=cpq_commercial_rule_header', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1605::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_header ADD CONSTRAINT fk_ggi871iihn0ii77 FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1605', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2527, '9:8e2144b295f5de34fdcf9d1c31a4d8e6', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_header, constraintName=fk_ggi871iihn0ii77, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1606::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_header ADD CONSTRAINT fk_omk25ihukik058ijj20 FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1606', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2529, '9:7e2175e6730ab5e68529813ed2ce9ca4', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_header, constraintName=fk_omk25ihukik058ijj20, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1607::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_header ADD CONSTRAINT fk_hhokb05o32yhp50 FOREIGN KEY (tag_id) REFERENCES cpq_tag (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1607', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2531, '9:2abd9e69b331ffd05fdabbdc14e87f41', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_header, constraintName=fk_hhokb05o32yhp50, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1608::TarikFAKHOURI
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk_quote_lot_id FOREIGN KEY (quote_lot_id) REFERENCES cpq_quote_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1608', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2533, '9:eb7fcae1582b160f4554e63775bfa090', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk_quote_lot_id, referencedTableName=cpq_quote_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1609::TarikFAKHOURI
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk_product_id FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1609', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2535, '9:4657b431d5221705aba4d3ecb5b42d27', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk_product_id, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1610::TarikFAKHOURI
ALTER TABLE cpq_contract ADD CONSTRAINT fk_cpq_contract_seller_id FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1610', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2537, '9:26dc58876d502dd4ae3a2badc1781621', 'addForeignKeyConstraint baseTableName=cpq_contract, constraintName=fk_cpq_contract_seller_id, referencedTableName=crm_seller', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1611::TarikFAKHOURI
ALTER TABLE cpq_contract ADD CONSTRAINT fk_cpq_contract_billing_account_id FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1611', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2539, '9:69400d168cde660b089b021c37f22389', 'addForeignKeyConstraint baseTableName=cpq_contract, constraintName=fk_cpq_contract_billing_account_id, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1612::TarikFAKHOURI
ALTER TABLE cpq_contract ADD CONSTRAINT fk_cpq_contract_customer_account_id FOREIGN KEY (customer_account_id) REFERENCES ar_customer_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1612', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2541, '9:fb8da42e1b162c265530ceba020a2e02', 'addForeignKeyConstraint baseTableName=cpq_contract, constraintName=fk_cpq_contract_customer_account_id, referencedTableName=ar_customer_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1613::TarikFAKHOURI
ALTER TABLE cpq_contract ADD CONSTRAINT fk_cpq_contract_customer_id FOREIGN KEY (customer_id) REFERENCES crm_customer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1613', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2543, '9:2e017487310a3726aa4ec01e4aec72eb', 'addForeignKeyConstraint baseTableName=cpq_contract, constraintName=fk_cpq_contract_customer_id, referencedTableName=crm_customer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1614::TarikFAKHOURI
ALTER TABLE cpq_contract_item ADD CONSTRAINT fk_cpq_contract_item_cpq_contract_id FOREIGN KEY (cpq_contract_id) REFERENCES cpq_contract (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1614', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2545, '9:6c705cd976f58f7a355e3dc446e238e7', 'addForeignKeyConstraint baseTableName=cpq_contract_item, constraintName=fk_cpq_contract_item_cpq_contract_id, referencedTableName=cpq_contract', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1615::TarikFAKHOURI
ALTER TABLE cpq_contract_item ADD CONSTRAINT fk_cpq_contract_item_offer_template_id FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1615', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2547, '9:8fa3b599cca797c42de58b5e29403cb9', 'addForeignKeyConstraint baseTableName=cpq_contract_item, constraintName=fk_cpq_contract_item_offer_template_id, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1616::TarikFAKHOURI
ALTER TABLE cpq_contract_item ADD CONSTRAINT fk_cpq_contract_item_cpq_product_id FOREIGN KEY (cpq_product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1616', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2549, '9:07b39d6ca3f01efa297e33a79694735c', 'addForeignKeyConstraint baseTableName=cpq_contract_item, constraintName=fk_cpq_contract_item_cpq_product_id, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1617::TarikFAKHOURI
ALTER TABLE cpq_contract_item ADD CONSTRAINT fk_cpq_contract_item_price_plan_id FOREIGN KEY (price_plan_id) REFERENCES cat_price_plan_matrix (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1617', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2551, '9:1dfa344a8a3ca4ee1d1485b5a25d6c8d', 'addForeignKeyConstraint baseTableName=cpq_contract_item, constraintName=fk_cpq_contract_item_price_plan_id, referencedTableName=cat_price_plan_matrix', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1618::TarikFAKHOURI
ALTER TABLE cpq_contract_item ADD CONSTRAINT fk_cpq_contract_item_charge_template_id FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1618', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2553, '9:129b0490ac3d736b2609cc9dedd610a6', 'addForeignKeyConstraint baseTableName=cpq_contract_item, constraintName=fk_cpq_contract_item_charge_template_id, referencedTableName=cat_charge_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1619::TarikFAKHOURI
ALTER TABLE cpq_contract_item ADD CONSTRAINT fk_cpq_contract_item_service_template_id FOREIGN KEY (service_template_id) REFERENCES cat_service_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1619', 'TarikFAKHOURI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2555, '9:30bb10b9a4c5541c0c67e594afdbc891', 'addForeignKeyConstraint baseTableName=cpq_contract_item, constraintName=fk_cpq_contract_item_service_template_id, referencedTableName=cat_service_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1620::Mbarek-Ay
ALTER TABLE cpq_grouped_service ADD CONSTRAINT "fk-product-product_version" FOREIGN KEY (product_version_id) REFERENCES cpq_product_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1620', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2557, '9:8f8743ec366b4b60d01107297d1d4e58', 'addForeignKeyConstraint baseTableName=cpq_grouped_service, constraintName=fk-product-product_version, referencedTableName=cpq_product_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1621::Mbarek-Ay
ALTER TABLE cpq_tag_filter ADD CONSTRAINT "fk-tag-tag_filter" FOREIGN KEY (tag_id) REFERENCES cpq_tag (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1621', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2559, '9:b781783f048973389d3fce50b3c07409', 'addForeignKeyConstraint baseTableName=cpq_tag_filter, constraintName=fk-tag-tag_filter, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1622::Mbarek-Ay
ALTER TABLE cpq_commercial_rule_line ADD CONSTRAINT fk_cpq_tag_rule_line FOREIGN KEY (tag_id) REFERENCES cpq_tag (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1622', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2561, '9:9a7a939888b75bfbc688ab747a13a46f', 'addForeignKeyConstraint baseTableName=cpq_commercial_rule_line, constraintName=fk_cpq_tag_rule_line, referencedTableName=cpq_tag', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1623::NabilOuachi
ALTER TABLE cpq_price_plan_version ADD CONSTRAINT fk_cpq_price_pla_version_price_plan_matrix FOREIGN KEY (ppm_id) REFERENCES cat_price_plan_matrix (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1623', 'NabilOuachi', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2563, '9:d5e064f3d2bfa95a40a310a39929f124', 'addForeignKeyConstraint baseTableName=cpq_price_plan_version, constraintName=fk_cpq_price_pla_version_price_plan_matrix, referencedTableName=cat_price_plan_matrix', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1624::Mbarek-Ay
ALTER TABLE cpq_order_offer ADD CONSTRAINT fk_cpq_order_offer_quote_offer_id FOREIGN KEY (quote_offer_id) REFERENCES quote_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1624', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2565, '9:761dbc19b2f54a76a240c25841bb1e42', 'addForeignKeyConstraint baseTableName=cpq_order_offer, constraintName=fk_cpq_order_offer_quote_offer_id, referencedTableName=quote_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1625::Mbarek-Ay
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_cpq_order_product_quote_product_id FOREIGN KEY (quote_product_id) REFERENCES cpq_quote_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1625', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2567, '9:04d0aa2e667c3d7828e739504787a0c5', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_cpq_order_product_quote_product_id, referencedTableName=cpq_quote_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1626::Mbarek-Ay
ALTER TABLE cpq_order_lot ADD CONSTRAINT fk_cpq_order_lot_quote_lot_id FOREIGN KEY (quote_lot_id) REFERENCES cpq_quote_lot (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1626', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2569, '9:110b07da31149646964cc768b20e5a45', 'addForeignKeyConstraint baseTableName=cpq_order_lot, constraintName=fk_cpq_order_lot_quote_lot_id, referencedTableName=cpq_quote_lot', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1627::Mbarek-Ay
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_offer_template_offer_model_id FOREIGN KEY (offer_model_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1627', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2571, '9:3deb4d70329c81678e27e4c543dec04b', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_offer_template_offer_model_id, referencedTableName=cat_offer_template', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1628::TarikFA.
ALTER TABLE cpq_product ADD CONSTRAINT fk_cpq_product_model_id FOREIGN KEY (product_model_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1628', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2573, '9:82db6ebea6e86f0bc5ace0db2357d332', 'addForeignKeyConstraint baseTableName=cpq_product, constraintName=fk_cpq_product_model_id, referencedTableName=cpq_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1629::Mbarek-Ay
ALTER TABLE cpq_quote_price ADD CONSTRAINT fk_cpq_quote_price_quote_offer FOREIGN KEY (quote_offer_id) REFERENCES quote_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1629', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2575, '9:2fe64fbd9ac0ae01354fc34715fa4c40', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=fk_cpq_quote_price_quote_offer, referencedTableName=quote_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1630::Mbarek-Ay
ALTER TABLE order_price ADD CONSTRAINT fk_order_price_order_offer FOREIGN KEY (order_offer_id) REFERENCES cpq_order_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1630', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2577, '9:9981ec8d2595f3438fd83b218a9ab15f', 'addForeignKeyConstraint baseTableName=order_price, constraintName=fk_order_price_order_offer, referencedTableName=cpq_order_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1631::Rachid.Aityaazza
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_discount_plan_id FOREIGN KEY (discount_plan_id) REFERENCES cat_discount_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1631', 'Rachid.Aityaazza', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2579, '9:f36c4c22fd1087c6673b6ffedaeb2319', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_discount_plan_id, referencedTableName=cat_discount_plan', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1632::Rachid.Aityaazza
ALTER TABLE cpq_quote_article_line ADD CONSTRAINT fk_quote_article_line_quote_version_id FOREIGN KEY (quote_version_id) REFERENCES cpq_quote_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1632', 'Rachid.Aityaazza', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2581, '9:0ba2b9640090ef808a1eed50d27c7aa1', 'addForeignKeyConstraint baseTableName=cpq_quote_article_line, constraintName=fk_quote_article_line_quote_version_id, referencedTableName=cpq_quote_version', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1633::MohammedELAZZOUZI
ALTER TABLE billing_billing_run ADD CONSTRAINT fk__billing_billing_run__invoice_type FOREIGN KEY (invoice_type_id) REFERENCES billing_invoice_type (id) ON UPDATE CASCADE ON DELETE CASCADE;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1633', 'MohammedELAZZOUZI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2583, '9:8fb2e23fceb147456bfdc27fb55e5fb4', 'addForeignKeyConstraint baseTableName=billing_billing_run, constraintName=fk__billing_billing_run__invoice_type, referencedTableName=billing_invoice_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1633::Mbarek-Ay
ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_subscription_order_offer_id FOREIGN KEY (order_offer_id) REFERENCES cpq_order_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1633', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2585, '9:9b316fce6981be56d06ee59924f018e7', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_billing_subscription_order_offer_id, referencedTableName=cpq_order_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1635::TarikFA.
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_subscription_id FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1635', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2587, '9:11e573ee381ce609208bb98459f6ed0b', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_subscription_id, referencedTableName=billing_subscription', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1636::TarikFA.
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_billing_rated_transaction_charge_instance_id FOREIGN KEY (charge_instance_id) REFERENCES billing_charge_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1636', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2589, '9:bd689dc8ce799af73e021dc7f4a7fbd0', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_billing_rated_transaction_charge_instance_id, referencedTableName=billing_charge_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-1581_FK_20210902::AbdelkaderBouazza
ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_next_subscription_id FOREIGN KEY (next_version) REFERENCES billing_subscription (id);

ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_previous_subscription_id FOREIGN KEY (previous_version) REFERENCES billing_subscription (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-1581_FK_20210902', 'AbdelkaderBouazza', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2591, '9:ce449ee842275ef071140fe5130fd3cc', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_billing_next_subscription_id, referencedTableName=billing_subscription; addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_billing_previous_su...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1637::Mbarek-Ay
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_billing_invoice_line_cpq_quote_id FOREIGN KEY (cpq_quote_id) REFERENCES cpq_quote (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1637', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2593, '9:0bf0b01b254e0f8e2d831d7a6c19c883', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_billing_invoice_line_cpq_quote_id, referencedTableName=cpq_quote', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-540-1639::Mbarek-Ay
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_invoice_line_quote_offer_id FOREIGN KEY (quote_offer_id) REFERENCES quote_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-540-1639', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2595, '9:e263c5a513c10ec7e86743e028db5655', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_invoice_line_quote_offer_id, referencedTableName=quote_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-540-1640::Mbarek-Ay
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_invoice_line_order_offer_id FOREIGN KEY (order_offer_id) REFERENCES cpq_order_offer (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-540-1640', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2597, '9:3aed0163e1266b99c95cbc1f72582365', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_invoice_line_order_offer_id, referencedTableName=cpq_order_offer', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1650-1418::hhanine
ALTER TABLE crm_provider ADD CONSTRAINT fk_dunning_default_pause_reason_provider FOREIGN KEY (dunning_default_pause_reason_id) REFERENCES dunning_pause_reasons (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1650-1418', 'hhanine', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2599, '9:c01b73f7f7a48cfdb63de7bf86870d8a', 'addForeignKeyConstraint baseTableName=crm_provider, constraintName=fk_dunning_default_pause_reason_provider, referencedTableName=dunning_pause_reasons', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-refactoring::AbdelmounaimAkadid
ALTER TABLE report_query_fields ADD CONSTRAINT fk_report_query_fields_id FOREIGN KEY (id) REFERENCES report_query (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE query_scheduler ADD CONSTRAINT fk_report_query_scheduler FOREIGN KEY (report_query_id) REFERENCES report_query (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE query_scheduler ADD CONSTRAINT fk_job_instance_scheduler FOREIGN KEY (job_instance_id) REFERENCES meveo_job_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE meveo_job_instance ADD CONSTRAINT fk_job_query_scheduler_id FOREIGN KEY (query_scheduler_id) REFERENCES query_scheduler (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE query_scheduler_users ADD CONSTRAINT fk_usr_query_scheduler_id FOREIGN KEY (query_scheduler_id) REFERENCES query_scheduler (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE query_scheduler_users ADD CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES adm_user (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE query_scheduler_emails ADD CONSTRAINT fk_query_scheduler_emails FOREIGN KEY (query_scheduler_id) REFERENCES query_scheduler (id) ON UPDATE CASCADE ON DELETE CASCADE;

ALTER TABLE query_execution_result ADD CONSTRAINT fk_scheduler_result FOREIGN KEY (query_scheduler_id) REFERENCES query_scheduler (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE query_execution_result ADD CONSTRAINT fk_report_query_execution FOREIGN KEY (report_query_id) REFERENCES report_query (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_settings ADD CONSTRAINT fk_dunning_settings_accounting_article_id FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_stop_reasons ADD CONSTRAINT fk_dunning_settings_stop_reasons_id FOREIGN KEY (dunning_settings_id) REFERENCES dunning_settings (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_agent ADD CONSTRAINT fk_dunning_agent_dunning_settings FOREIGN KEY (dunning_settings_id) REFERENCES dunning_settings (id);

ALTER TABLE dunning_collection_plan_statuses ADD CONSTRAINT fk_dunning_collection_plan_statuses_dunning_settings FOREIGN KEY (dunning_settings_id) REFERENCES dunning_settings (id);

ALTER TABLE dunning_pause_reasons ADD CONSTRAINT fk_dunning_pause_reasons_dunning_settings FOREIGN KEY (dunning_settings_id) REFERENCES dunning_settings (id);

ALTER TABLE dunning_payment_retries ADD CONSTRAINT fk_dunning_payment_retries_dunning_settings FOREIGN KEY (dunning_settings_id) REFERENCES dunning_settings (id);

ALTER TABLE cpq_quote_version_media ADD CONSTRAINT fk_cpq_quote_version_media_id FOREIGN KEY (cpq_quote_version_id) REFERENCES cpq_quote_version (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE cpq_quote_version_media ADD CONSTRAINT fk_cpq_media_quote_version_id FOREIGN KEY (cpq_media_id) REFERENCES cpq_media (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE sub_accounting_period ADD CONSTRAINT fk_accounting_period FOREIGN KEY (accounting_period_id) REFERENCES accounting_period (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_occ_template ADD CONSTRAINT fk_journal_template_scheduler FOREIGN KEY (journal_id) REFERENCES journal (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_account_operation ADD CONSTRAINT fk_journal_account_operation_scheduler FOREIGN KEY (journal_id) REFERENCES journal (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE offer_template_attribute ADD CONSTRAINT offer_template_attribute_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE offer_template_attribute ADD CONSTRAINT offer_template_attribute_offer_template_id FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_dunning_action ADD CONSTRAINT fk_ar_dunning_action_meveo_script_instance FOREIGN KEY (script_instance_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_dunning_action ADD CONSTRAINT fk_ar_dunning_action_email_template FOREIGN KEY (action_notification_template_id) REFERENCES com_message_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_dunning_action ADD CONSTRAINT fk_dunning_action_agent FOREIGN KEY (dunning_agent_id) REFERENCES dunning_agent (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_policy_rule ADD CONSTRAINT fk_dunning_determine_level_by_id FOREIGN KEY (dunning_policy_id) REFERENCES dunning_policy (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_policy_rule_line ADD CONSTRAINT fk_dunning_policy_rule_id FOREIGN KEY (dunning_policy_rule_id) REFERENCES dunning_policy_rule (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_level ADD CONSTRAINT fk_dunning_level_min_balance_currency FOREIGN KEY (min_balance_currency_id) REFERENCES adm_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_level ADD CONSTRAINT fk_dunning_level_charge_currency FOREIGN KEY (charge_currency_id) REFERENCES adm_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_level_dunning_action ADD CONSTRAINT dunning_level_dunning_action_pkey_const FOREIGN KEY (dunning_level_id) REFERENCES dunning_level (id);

ALTER TABLE dunning_level_dunning_action ADD CONSTRAINT dunning_action_dunning_level_pkey_const FOREIGN KEY (dunning_action_id) REFERENCES ar_dunning_action (id);

ALTER TABLE dunning_policy_level ADD CONSTRAINT fk_dunning_policy_level_dunning_level FOREIGN KEY (dunning_level_id) REFERENCES dunning_level (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_policy_level ADD CONSTRAINT fk_dunning_policy_level_collection_plan_status FOREIGN KEY (collection_plan_status_id) REFERENCES dunning_collection_plan_statuses (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_policy_level ADD CONSTRAINT fk_dunning_policy_id FOREIGN KEY (dunning_policy_id) REFERENCES dunning_policy (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE ar_accounting_scheme ADD CONSTRAINT fk_acc_scheme_script_inst_id FOREIGN KEY (script_instance_id) REFERENCES meveo_script_instance (id) ON UPDATE NO ACTION ON DELETE SET NULL;

ALTER TABLE ar_occ_template ADD CONSTRAINT fk_occ_tmplt_accnt_scheme_id FOREIGN KEY (accounting_scheme_id) REFERENCES ar_accounting_scheme (id) ON UPDATE NO ACTION ON DELETE SET NULL;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-refactoring', 'AbdelmounaimAkadid', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2601, '9:6858afea1dc1875c32a324cc426a9970', 'addForeignKeyConstraint baseTableName=report_query_fields, constraintName=fk_report_query_fields_id, referencedTableName=report_query; addForeignKeyConstraint baseTableName=query_scheduler, constraintName=fk_report_query_scheduler, referencedTable...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-540-1641::ZBariki
ALTER TABLE dunning_policy ADD CONSTRAINT fk_dunning_min_balance_currency_id FOREIGN KEY (min_balance_trigger_currency_id) REFERENCES adm_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-540-1641', 'ZBariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2603, '9:e4e547b55bcbbd8ac506c7ad3aa7a7eb', 'addForeignKeyConstraint baseTableName=dunning_policy, constraintName=fk_dunning_min_balance_currency_id, referencedTableName=adm_currency', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-INTRD-2959::Mbarek-Ay
ALTER TABLE cpq_quote ADD CONSTRAINT fk_cpq_quote_user_account_id FOREIGN KEY (user_account_id) REFERENCES billing_user_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE quote_offer ADD CONSTRAINT fk_quote_offer_user_account_id FOREIGN KEY (user_account_id) REFERENCES billing_user_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-INTRD-2959', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2605, '9:694b7cc17f591e37fc60bfc75984084e', 'addForeignKeyConstraint baseTableName=cpq_quote, constraintName=fk_cpq_quote_user_account_id, referencedTableName=billing_user_account; addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_quote_offer_user_account_id, referencedTab...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-540-1642::HatimOUDAD
ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_dunning_collection_billing_account FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_dunning_collection_pause_reason FOREIGN KEY (pause_reason_id) REFERENCES dunning_pause_reasons (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_dunning_collection_stop_reason FOREIGN KEY (stop_reason_id) REFERENCES dunning_stop_reasons (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_dunning_collection_related_policy FOREIGN KEY (related_policy_id) REFERENCES dunning_policy (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_dunning_collection_plan_status FOREIGN KEY (status_id) REFERENCES dunning_collection_plan_statuses (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_initial_collection_plan FOREIGN KEY (initial_collection_plan_id) REFERENCES dunning_collection_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_collection_plan ADD CONSTRAINT fk_collection_plan_related_invoice FOREIGN KEY (related_invoice_id) REFERENCES billing_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-540-1642', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2607, '9:ee1ebe54f3f603640fc12e165c7d67a2', 'addForeignKeyConstraint baseTableName=dunning_collection_plan, constraintName=fk_dunning_collection_billing_account, referencedTableName=billing_billing_account; addForeignKeyConstraint baseTableName=dunning_collection_plan, constraintName=fk_dunn...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-2973_20211110-rebuild-str-fk::AmineBENAICHA
ALTER TABLE dunning_level_instance ADD CONSTRAINT fk_dunning_level_instance_collection_plan FOREIGN KEY (dunning_collection_plan_id) REFERENCES dunning_collection_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_level_instance ADD CONSTRAINT fk_dunning_collection_plan_statuses FOREIGN KEY (dunning_collection_plan_status_id) REFERENCES dunning_collection_plan_statuses (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_level_instance ADD CONSTRAINT fk_dunning_level_instance_dunning_level FOREIGN KEY (dunning_level_id) REFERENCES dunning_level (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_action_instance ADD CONSTRAINT fk_dunning_action_instance_agent FOREIGN KEY (dunning_agent_id) REFERENCES dunning_agent (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_action_instance ADD CONSTRAINT fk_dunning_action_instance_collection_plan FOREIGN KEY (dunning_collection_plan_id) REFERENCES dunning_collection_plan (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE dunning_action_instance ADD CONSTRAINT fk_dunning_level_instance FOREIGN KEY (dunning_level_instance_id) REFERENCES dunning_level_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-2973_20211110-rebuild-str-fk', 'AmineBENAICHA', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2609, '9:7bc764b9241e10db32cdacc0889424af', 'addForeignKeyConstraint baseTableName=dunning_level_instance, constraintName=fk_dunning_level_instance_collection_plan, referencedTableName=dunning_collection_plan; addForeignKeyConstraint baseTableName=dunning_level_instance, constraintName=fk_du...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-540-1638::Mbarek-Ay
ALTER TABLE billing_invoice ADD CONSTRAINT fk_billing_invoice_cpq_quote_id FOREIGN KEY (cpq_quote_id) REFERENCES cpq_quote (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-540-1638', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2611, '9:4632eced96cdce827eaa3d06742b0ae2', 'addForeignKeyConstraint baseTableName=billing_invoice, constraintName=fk_billing_invoice_cpq_quote_id, referencedTableName=cpq_quote', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-540-1643::HichamHanine
ALTER TABLE billing_accounting_article ADD CONSTRAINT fk_billing_accounting_article_invoice_type FOREIGN KEY (invoice_type_id) REFERENCES billing_invoice_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-540-1643', 'HichamHanine', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2613, '9:1d1d66db884e7acb9a20d6683411765d', 'addForeignKeyConstraint baseTableName=billing_accounting_article, constraintName=fk_billing_accounting_article_invoice_type, referencedTableName=billing_invoice_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-3461_20212128-rebuild-str-fk::hichamElHaloui
ALTER TABLE security_deposit_templat ADD CONSTRAINT fk_adm_currency_security_deposit_templat FOREIGN KEY (currency_id) REFERENCES adm_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE security_deposit ADD CONSTRAINT fk_security_deposit_templat_security_deposit FOREIGN KEY (templat_id) REFERENCES security_deposit_templat (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE security_deposit ADD CONSTRAINT fk_adm_currency_security_deposit FOREIGN KEY (currency_id) REFERENCES adm_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE security_deposit ADD CONSTRAINT fk_ar_customer_account_security_deposit FOREIGN KEY (customer_account_id) REFERENCES ar_customer_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE security_deposit ADD CONSTRAINT fk_billing_subscription_security_deposit FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE security_deposit ADD CONSTRAINT fk_billing_service_instance_security_deposit FOREIGN KEY (service_instance_id) REFERENCES billing_service_instance (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-3461_20212128-rebuild-str-fk', 'hichamElHaloui', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2615, '9:15e39b1d54850dce207a181d8ba789b2', 'addForeignKeyConstraint baseTableName=security_deposit_templat, constraintName=fk_adm_currency_security_deposit_templat, referencedTableName=adm_currency; addForeignKeyConstraint baseTableName=security_deposit, constraintName=fk_security_deposit_t...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-10283_20220930-rebuild-str-fk::HichamHANINE
ALTER TABLE security_deposit ADD CONSTRAINT fk_billing_account_security_deposit FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-10283_20220930-rebuild-str-fk', 'HichamHANINE', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2617, '9:02075a9d9fd24387a147665006235bd5', 'addForeignKeyConstraint baseTableName=security_deposit, constraintName=fk_billing_account_security_deposit, referencedTableName=billing_billing_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-9946_20220920-rebuild-str-fk::HichamHANINE
ALTER TABLE security_deposit ADD CONSTRAINT fk_security_deposit_invoice FOREIGN KEY (sd_invoice_id) REFERENCES billing_invoice (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-9946_20220920-rebuild-str-fk', 'HichamHANINE', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2619, '9:2f1bfcdd1f0098f97faa661c408b2253', 'addForeignKeyConstraint baseTableName=security_deposit, constraintName=fk_security_deposit_invoice, referencedTableName=billing_invoice', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-4654_20220203-rebuild-str-fk::HanineHicham
ALTER TABLE security_deposit_transaction ADD CONSTRAINT fk_security_deposit_security_deposit_transaction FOREIGN KEY (security_deposit_id) REFERENCES security_deposit (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE security_deposit_transaction ADD CONSTRAINT fk_ar_account_operation_security_deposit_transaction FOREIGN KEY (account_operation_id) REFERENCES ar_account_operation (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-4654_20220203-rebuild-str-fk', 'HanineHicham', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2621, '9:757b9bd4fcd43ce56a952d4057c4017a', 'addForeignKeyConstraint baseTableName=security_deposit_transaction, constraintName=fk_security_deposit_security_deposit_transaction, referencedTableName=security_deposit; addForeignKeyConstraint baseTableName=security_deposit_transaction, constrai...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-1644::Ilyasstalal
ALTER TABLE billing_user_account ADD CONSTRAINT fk_user_account_parent FOREIGN KEY (parent_useraccount_id) REFERENCES billing_user_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-1644', 'Ilyasstalal', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2623, '9:99952762145928f19be1735b04abcee9', 'addForeignKeyConstraint baseTableName=billing_user_account, constraintName=fk_user_account_parent, referencedTableName=billing_user_account', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-5310-20220310-fk::HichamELHALOUI
ALTER TABLE open_order_threshold ADD CONSTRAINT open_order_threshold_open_order_template_id_fk FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id) ON UPDATE CASCADE ON DELETE CASCADE;

ALTER TABLE open_order_template_tags ADD CONSTRAINT open_order_template_tags_open_order_template_id_fk FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id);

ALTER TABLE open_order_template_tags ADD CONSTRAINT open_order_template_tags_tag_id_fk FOREIGN KEY (tag_id) REFERENCES cpq_tag (id);

ALTER TABLE open_order_template_products ADD CONSTRAINT open_order_template_products_open_order_template_id_fk FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id);

ALTER TABLE open_order_template_products ADD CONSTRAINT open_order_template_products_product_id_fk FOREIGN KEY (open_product_id) REFERENCES open_order_product (id);

ALTER TABLE open_order_template_articles ADD CONSTRAINT open_order_template_articles_open_order_template_id_fk FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id);

ALTER TABLE open_order_template_articles ADD CONSTRAINT open_order_template_articles_article_id_fk FOREIGN KEY (open_article_id) REFERENCES open_order_article (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-5310-20220310-fk', 'HichamELHALOUI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2625, '9:495855170e35bbdcf7c11cdf17a0fb03', 'addForeignKeyConstraint baseTableName=open_order_threshold, constraintName=open_order_threshold_open_order_template_id_fk, referencedTableName=open_order_template; addForeignKeyConstraint baseTableName=open_order_template_tags, constraintName=open...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-5636-20220318-fk::hhannine
ALTER TABLE exchange_rate ADD CONSTRAINT fk_exchange_rate_trading_currency_id FOREIGN KEY (trading_currency_id) REFERENCES billing_trading_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-5636-20220318-fk', 'hhannine', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2627, '9:f9ffb7f9d14a26a4333f4a08caae7c4c', 'addForeignKeyConstraint baseTableName=exchange_rate, constraintName=fk_exchange_rate_trading_currency_id, referencedTableName=billing_trading_currency', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-13981_20230222-fk::HichamHANINE
ALTER TABLE ar_account_operation ADD CONSTRAINT fk_account_operation_trading_currency FOREIGN KEY (transactional_currency) REFERENCES billing_trading_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-13981_20230222-fk', 'HichamHANINE', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2629, '9:02f9d02e8c8ee2a40457c4f68d6fd756', 'addForeignKeyConstraint baseTableName=ar_account_operation, constraintName=fk_account_operation_trading_currency, referencedTableName=billing_trading_currency', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-5804-20220321-fk::HatimOUDAD
ALTER TABLE cpq_order_product ADD CONSTRAINT fk_q6d91d7b6bc2ypdbx4tjbr0acbd FOREIGN KEY (sub_termin_reason_id) REFERENCES billing_subscrip_termin_reason (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE cpq_order_offer ADD CONSTRAINT fk_dwdlb9d5mlvdddm3yowwa9uembd FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-5804-20220321-fk', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2631, '9:57a141cf194df87526e363ebcaa15228', 'addForeignKeyConstraint baseTableName=cpq_order_product, constraintName=fk_q6d91d7b6bc2ypdbx4tjbr0acbd, referencedTableName=billing_subscrip_termin_reason; addForeignKeyConstraint baseTableName=cpq_order_offer, constraintName=fk_dwdlb9d5mlvdddm3yo...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-4702-20220321-fk::ZBariki
ALTER TABLE ar_occ_template ADD CONSTRAINT fk_contra_accounting_code_id FOREIGN KEY (contra_accounting_code_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-4702-20220321-fk', 'ZBariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2633, '9:5905d2aa074ee61f503e3f6dc8a99047', 'addForeignKeyConstraint baseTableName=ar_occ_template, constraintName=fk_contra_accounting_code_id, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-5994-20220328-fk::HichamELHALOUI
ALTER TABLE ar_occ_template ADD CONSTRAINT fk_contra_accounting_code2_id FOREIGN KEY (contra_accounting_code2_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-5994-20220328-fk', 'HichamELHALOUI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2635, '9:d4d759ba85a8b1dc366c37791564dd7a', 'addForeignKeyConstraint baseTableName=ar_occ_template, constraintName=fk_contra_accounting_code2_id, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-6136-20220406-fk::HatimOUDAD
ALTER TABLE cpq_order_offer ADD CONSTRAINT fk_q6d91d7b6bc2ypdbx4tjbr0acbdafs FOREIGN KEY (sub_termin_reason_id) REFERENCES billing_subscrip_termin_reason (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-6136-20220406-fk', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2637, '9:6d12d180bbbb072f54c787c1c6a3fd46', 'addForeignKeyConstraint baseTableName=cpq_order_offer, constraintName=fk_q6d91d7b6bc2ypdbx4tjbr0acbdafs, referencedTableName=billing_subscrip_termin_reason', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-540-5991-fk1::Mbarek-Ay
ALTER TABLE cpq_assigned_attributes ADD CONSTRAINT fk_cpq_assigned_attributes_attribute_id FOREIGN KEY (attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-540-5991-fk1', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2639, '9:479de902261659870f2511cc2daafcd2', 'addForeignKeyConstraint baseTableName=cpq_assigned_attributes, constraintName=fk_cpq_assigned_attributes_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-540-5991-fk2::Mbarek-Ay
ALTER TABLE cpq_assigned_attributes ADD CONSTRAINT fk_cpq_assigned_attributes_assigned_attribute_id FOREIGN KEY (assigned_attribute_id) REFERENCES cpq_attribute (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-540-5991-fk2', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2641, '9:4bfac0b217ff20f6b3ed9bec142ed0b1', 'addForeignKeyConstraint baseTableName=cpq_assigned_attributes, constraintName=fk_cpq_assigned_attributes_assigned_attribute_id, referencedTableName=cpq_attribute', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-6056_20220413-fk::HatimOUDAD
ALTER TABLE cpq_quote_product ADD CONSTRAINT fk_q6d91d7b6bc2ypdbx4tjbr0acbdcc FOREIGN KEY (sub_termin_reason_id) REFERENCES billing_subscrip_termin_reason (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE quote_offer ADD CONSTRAINT fk_dwdlb9d5mlvdddm3yowwa9uembdcc FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-6056_20220413-fk', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2643, '9:e9bb05d7063ce7873dcb1cb85fde1b56', 'addForeignKeyConstraint baseTableName=cpq_quote_product, constraintName=fk_q6d91d7b6bc2ypdbx4tjbr0acbdcc, referencedTableName=billing_subscrip_termin_reason; addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_dwdlb9d5mlvdddm3yoww...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk1-540-6296-fk1::Mbarek-Ay
ALTER TABLE cpq_quote_price ADD CONSTRAINT fk_quote_price_cat_discount_plan_item FOREIGN KEY (discount_plan_item_id) REFERENCES cat_discount_plan_item (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk1-540-6296-fk1', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2645, '9:1e89f7ea1b8d0080bb5a1ab7ba5211ae', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=fk_quote_price_cat_discount_plan_item, referencedTableName=cat_discount_plan_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk2-540-6296::Mbarek-Ay
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_wallet_operation_cat_discount_plan_item FOREIGN KEY (discount_plan_item_id) REFERENCES cat_discount_plan_item (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk2-540-6296', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2647, '9:4b893fd63cca1ff279fbb33f31901c7e', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_wallet_operation_cat_discount_plan_item, referencedTableName=cat_discount_plan_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk3-540-6296::Mbarek-Ay
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rated_transaction_cat_discount_plan_item FOREIGN KEY (discount_plan_item_id) REFERENCES cat_discount_plan_item (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk3-540-6296', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2649, '9:7106229215ca0b18010f746e0a173d2e', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rated_transaction_cat_discount_plan_item, referencedTableName=cat_discount_plan_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk4-540-6296::Mbarek-Ay
ALTER TABLE billing_invoice_line ADD CONSTRAINT fk_invoice_line_cat_discount_plan_item FOREIGN KEY (discount_plan_item_id) REFERENCES cat_discount_plan_item (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk4-540-6296', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2651, '9:a6f518ed9eac02cdfbbf66c78b4adf36', 'addForeignKeyConstraint baseTableName=billing_invoice_line, constraintName=fk_invoice_line_cat_discount_plan_item, referencedTableName=cat_discount_plan_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::rebuild-str-fk-8036::hichamhanine
ALTER TABLE invoice_sub_totals ADD CONSTRAINT fk_invoice_sub_totals_invoice_type FOREIGN KEY (invoice_type_id) REFERENCES billing_invoice_type (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('rebuild-str-fk-8036', 'hichamhanine', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2653, '9:c6a6e194425109a8487c4e314eb4e2ee', 'addForeignKeyConstraint baseTableName=invoice_sub_totals, constraintName=fk_invoice_sub_totals_invoice_type, referencedTableName=billing_invoice_type', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::INTRD-5806_20220516-fk::HichamELHALOUI
ALTER TABLE finance_settings ADD CONSTRAINT fk_finance_settings_open_order_setting_id FOREIGN KEY (open_order_settings_id) REFERENCES open_order_setting (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('INTRD-5806_20220516-fk', 'HichamELHALOUI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2655, '9:d62289986710f1d5a0ff67fafe4e0b46', 'addForeignKeyConstraint baseTableName=finance_settings, constraintName=fk_finance_settings_open_order_setting_id, referencedTableName=open_order_setting', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-7422_20220525-fk::ZBariki
ALTER TABLE ar_customer_account ADD CONSTRAINT fk_general_client_account FOREIGN KEY (general_client_account_id) REFERENCES billing_accounting_code (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-7422_20220525-fk', 'ZBariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2657, '9:d29c723b5825d90142ab9e3edb9b0cb0', 'addForeignKeyConstraint baseTableName=ar_customer_account, constraintName=fk_general_client_account, referencedTableName=billing_accounting_code', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-7537_20220531-fk::TarikRabeh
ALTER TABLE billing_billing_run ADD CONSTRAINT fk_billing_billing_run_origin_billing_run FOREIGN KEY (origin_billing_run_id) REFERENCES billing_billing_run (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-7537_20220531-fk', 'TarikRabeh', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2659, '9:3f973f154b4a8251391e9ec83f3f5b23', 'addForeignKeyConstraint baseTableName=billing_billing_run, constraintName=fk_billing_billing_run_origin_billing_run, referencedTableName=billing_billing_run', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-8026_20220622_fk::HatimOUDAD
ALTER TABLE open_order_quote ADD CONSTRAINT fk_open_order_template FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_quote ADD CONSTRAINT fk_currency_quote FOREIGN KEY (currency_id) REFERENCES billing_trading_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_quote ADD CONSTRAINT fk_billing_account_quote FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_quote ADD CONSTRAINT fk_open_order FOREIGN KEY (open_order_id) REFERENCES open_order (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_threshold ADD CONSTRAINT fk_threshold_open_quote FOREIGN KEY (open_order_quote_id) REFERENCES open_order_quote (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-8026_20220622_fk', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2661, '9:6602cefe9df77458deaeda049f8ae75c', 'addForeignKeyConstraint baseTableName=open_order_quote, constraintName=fk_open_order_template, referencedTableName=open_order_template; addForeignKeyConstraint baseTableName=open_order_quote, constraintName=fk_currency_quote, referencedTableName=b...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-8022_20220624_fk::HatimOUDAD
ALTER TABLE open_order_article ADD CONSTRAINT fk_open_billing_accounting_article FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_article ADD CONSTRAINT fk_open_order_template_article FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_product ADD CONSTRAINT fk_product_open_order_product FOREIGN KEY (product_id) REFERENCES cpq_product (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE open_order_product ADD CONSTRAINT fk_open_order_template_product FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-8022_20220624_fk', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2663, '9:e7059a6f89ed29f4d07b15fe709f8fc0', 'addForeignKeyConstraint baseTableName=open_order_article, constraintName=fk_open_billing_accounting_article, referencedTableName=billing_accounting_article; addForeignKeyConstraint baseTableName=open_order_article, constraintName=fk_open_order_tem...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-8219_20220627_fk::HatimOUDAD
ALTER TABLE open_order_quote_tags ADD CONSTRAINT open_order_quote_tags_open_order_quote_id_fk FOREIGN KEY (open_order_quote_id) REFERENCES open_order_quote (id);

ALTER TABLE open_order_quote_tags ADD CONSTRAINT open_order_quote_tags_tag_id_fk FOREIGN KEY (tag_id) REFERENCES cpq_tag (id);

ALTER TABLE open_order_quote_products ADD CONSTRAINT open_order_quote_products_open_order_quote_id_fk FOREIGN KEY (open_order_quote_id) REFERENCES open_order_quote (id);

ALTER TABLE open_order_quote_products ADD CONSTRAINT open_order_quote_products_product_id_fk FOREIGN KEY (open_product_id) REFERENCES open_order_product (id);

ALTER TABLE open_order_quote_articles ADD CONSTRAINT open_order_quote_articles_open_order_quote_id_fk FOREIGN KEY (open_order_quote_id) REFERENCES open_order_quote (id);

ALTER TABLE open_order_quote_articles ADD CONSTRAINT open_order_quote_articles_article_id_fk FOREIGN KEY (open_article_id) REFERENCES open_order_article (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-8219_20220627_fk', 'HatimOUDAD', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2665, '9:a8911029cbced21f4ca87246f59d3827', 'addForeignKeyConstraint baseTableName=open_order_quote_tags, constraintName=open_order_quote_tags_open_order_quote_id_fk, referencedTableName=open_order_quote; addForeignKeyConstraint baseTableName=open_order_quote_tags, constraintName=open_order_...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-8117_20220629_rebuild_str_fk::ZBariki
ALTER TABLE open_order ADD CONSTRAINT open_order_open_order_template_id_fk FOREIGN KEY (open_order_template_id) REFERENCES open_order_template (id);

ALTER TABLE open_order ADD CONSTRAINT open_order_billing_account_id_fk FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id);

ALTER TABLE open_order ADD CONSTRAINT open_order_currency_id_fk FOREIGN KEY (currency_id) REFERENCES billing_trading_currency (id);

ALTER TABLE open_order ADD CONSTRAINT open_order_open_order_quote_id_fk FOREIGN KEY (open_order_quote_id) REFERENCES open_order_quote (id);

ALTER TABLE open_order_threshold ADD CONSTRAINT open_order_threshold_open_order_id_fk FOREIGN KEY (open_order_id) REFERENCES open_order (id);

ALTER TABLE cpq_product ADD CONSTRAINT cpq_product_open_order_id_fk FOREIGN KEY (open_order_id) REFERENCES open_order (id);

ALTER TABLE crm_address_book_contact ADD CONSTRAINT address_book_contact_address_book_fk FOREIGN KEY (address_book_id) REFERENCES crm_address_book (id);

ALTER TABLE crm_address_book_contact ADD CONSTRAINT address_book_contact_contact_fk FOREIGN KEY (contact_id) REFERENCES com_contact (id);

ALTER TABLE crm_address_book ADD CONSTRAINT address_book_crm_customer_id_fk FOREIGN KEY (customer_id) REFERENCES crm_customer (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-8117_20220629_rebuild_str_fk', 'ZBariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2667, '9:4d868c26f1efe9b4ba5222e4366d0278', 'addForeignKeyConstraint baseTableName=open_order, constraintName=open_order_open_order_template_id_fk, referencedTableName=open_order_template; addForeignKeyConstraint baseTableName=open_order, constraintName=open_order_billing_account_id_fk, refe...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-10683_20221107_fk::AdilElJaouhari
ALTER TABLE meveo_script_parameter ADD CONSTRAINT script_parameter_script_instance_id_fk FOREIGN KEY (script_instance_id) REFERENCES meveo_script_instance (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-10683_20221107_fk', 'AdilElJaouhari', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2669, '9:da1af9cf1758ec46ae3faa641ae65bbb', 'addForeignKeyConstraint baseTableName=meveo_script_parameter, constraintName=script_parameter_script_instance_id_fk, referencedTableName=meveo_script_instance', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-11775_20221120_fk::hichamELHALOUI
ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_billing_cycle FOREIGN KEY (billing_cycle_id) REFERENCES billing_cycle (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_billing_run FOREIGN KEY (billing_run_id) REFERENCES billing_billing_run (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-11775_20221120_fk', 'hichamELHALOUI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2671, '9:f8c82b3fcce99744974158ea16ca9c2c', 'addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_billing_cycle, referencedTableName=billing_cycle; addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-12614_20221227_fk::hichamELHALOUI
ALTER TABLE cpq_trading_price_plan_matrix_line ADD CONSTRAINT fk_cpq_trading_price_plan_matrix_line_id FOREIGN KEY (trading_currency_id) REFERENCES billing_trading_currency (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE cpq_trading_price_plan_matrix_line ADD CONSTRAINT fk_price_plan_matrix_line_id FOREIGN KEY (price_plan_matrix_line_id) REFERENCES cpq_price_plan_matrix_line (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-12614_20221227_fk', 'hichamELHALOUI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2673, '9:664c932661dc6534265c25e4b1f94e88', 'addForeignKeyConstraint baseTableName=cpq_trading_price_plan_matrix_line, constraintName=fk_cpq_trading_price_plan_matrix_line_id, referencedTableName=billing_trading_currency; addForeignKeyConstraint baseTableName=cpq_trading_price_plan_matrix_li...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-12544_20230102_fk::bourras
ALTER TABLE cat_offer_template ADD CONSTRAINT fk_document_id FOREIGN KEY (document_id) REFERENCES document (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-12544_20230102_fk', 'bourras', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2675, '9:5ca272f9113c22134173c0936fd5ed60', 'addForeignKeyConstraint baseTableName=cat_offer_template, constraintName=fk_document_id, referencedTableName=document', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-14522_20230301_fk::TarikFA.
ALTER TABLE billing_subscription ADD CONSTRAINT fk_contract_id FOREIGN KEY (contract_id) REFERENCES cpq_contract (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE quote_offer ADD CONSTRAINT fk_contract_id FOREIGN KEY (contract_id) REFERENCES cpq_contract (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-14522_20230301_fk', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2677, '9:bdc244703dacea88e4e79078dd937c92', 'addForeignKeyConstraint baseTableName=billing_subscription, constraintName=fk_contract_id, referencedTableName=cpq_contract; addForeignKeyConstraint baseTableName=quote_offer, constraintName=fk_contract_id, referencedTableName=cpq_contract', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-14336_20230227_fk::ZBariki
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_wo_contract_line_id FOREIGN KEY (contract_line_id) REFERENCES cpq_contract_item (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-14336_20230227_fk', 'ZBariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2679, '9:8ab338091eab2dc9e2a07f623b3827c2', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_wo_contract_line_id, referencedTableName=cpq_contract_item', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-16039_20230512_fk::a.rouaguebe
ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_offer_category FOREIGN KEY (offer_category_id) REFERENCES cat_offer_template_category (id);

ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_offer_template FOREIGN KEY (offer_template_id) REFERENCES cat_offer_template (id);

ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_cpq_product FOREIGN KEY (product_id) REFERENCES cpq_product (id);

ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_charge_template FOREIGN KEY (charge_template_id) REFERENCES cat_charge_template (id);

ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_price_plan FOREIGN KEY (price_plan_id) REFERENCES cat_price_plan_matrix (id);

ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_price_list FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_line ADD CONSTRAINT fk_pli_line_product_line FOREIGN KEY (product_line_id) REFERENCES cpq_product_line (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-16039_20230512_fk', 'a.rouaguebe', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2681, '9:e1365e2a83880b5f493f463475a3ec82', 'addForeignKeyConstraint baseTableName=cat_price_list_line, constraintName=fk_pli_line_offer_category, referencedTableName=cat_offer_template_category; addForeignKeyConstraint baseTableName=cat_price_list_line, constraintName=fk_pli_line_offer_temp...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-16036_20230516_fk::zelmeliani
ALTER TABLE cat_price_list_customer_brand ADD CONSTRAINT cat_price_list_customer_brand_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_customer_brand ADD CONSTRAINT cat_price_list_customer_brand_cb_fk FOREIGN KEY (customer_brand_id) REFERENCES crm_customer_brand (id);

ALTER TABLE cat_price_list_customer_category ADD CONSTRAINT cat_price_list_customer_category_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_customer_category ADD CONSTRAINT cat_price_list_customer_category_cc_fk FOREIGN KEY (customer_category_id) REFERENCES crm_customer_category (id);

ALTER TABLE cat_price_list_credit_category ADD CONSTRAINT cat_price_list_credit_category_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_credit_category ADD CONSTRAINT cat_price_list_credit_category_cc_fk FOREIGN KEY (credit_category_id) REFERENCES ar_credit_category (id);

ALTER TABLE cat_price_list_country ADD CONSTRAINT cat_price_list_country_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_country ADD CONSTRAINT cat_price_list_country_c_fk FOREIGN KEY (country_id) REFERENCES adm_country (id);

ALTER TABLE cat_price_list_currency ADD CONSTRAINT cat_price_list_currency_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_currency ADD CONSTRAINT cat_price_list_currency_c_fk FOREIGN KEY (currency_id) REFERENCES adm_currency (id);

ALTER TABLE cat_price_list_legal_entity ADD CONSTRAINT cat_price_list_legal_entity_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_legal_entity ADD CONSTRAINT cat_price_list_legal_entity_le_fk FOREIGN KEY (legal_entity_id) REFERENCES adm_title (id);

ALTER TABLE cat_price_list_payment_method ADD CONSTRAINT cat_price_list_payment_method_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_seller ADD CONSTRAINT cat_price_list_seller_pli_fk FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cat_price_list_seller ADD CONSTRAINT cat_price_list_seller_s_fk FOREIGN KEY (seller_id) REFERENCES crm_seller (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-16036_20230516_fk', 'zelmeliani', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2683, '9:ee65c7593f9ac4198e3566e91d9a576b', 'addForeignKeyConstraint baseTableName=cat_price_list_customer_brand, constraintName=cat_price_list_customer_brand_pli_fk, referencedTableName=cat_price_list; addForeignKeyConstraint baseTableName=cat_price_list_customer_brand, constraintName=cat_p...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-16396_20230522_pli_quote-rebuild::a.rouaguebe
ALTER TABLE cpq_quote_version ADD CONSTRAINT fk_cpq_quote_version_price_list FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE cpq_commercial_order ADD CONSTRAINT fk_cpq_commercial_order_price_list FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

ALTER TABLE billing_subscription ADD CONSTRAINT fk_billing_subscription_price_list FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-16396_20230522_pli_quote-rebuild', 'a.rouaguebe', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2685, '9:a158cf7eba59d3bf123b39c1ffe74c5b', 'addForeignKeyConstraint baseTableName=cpq_quote_version, constraintName=fk_cpq_quote_version_price_list, referencedTableName=cat_price_list; addForeignKeyConstraint baseTableName=cpq_commercial_order, constraintName=fk_cpq_commercial_order_price_l...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-16203_20230519_ba_pricelist_fk::a.rouaguebe
ALTER TABLE billing_billing_account ADD CONSTRAINT fk_ba_price_list FOREIGN KEY (price_list_id) REFERENCES cat_price_list (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-16203_20230519_ba_pricelist_fk', 'a.rouaguebe', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2687, '9:4a0d930aa2a612c1c39d9c397fc8c01e', 'addForeignKeyConstraint baseTableName=billing_billing_account, constraintName=fk_ba_price_list, referencedTableName=cat_price_list', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-15849_20230509_FK::TarikFA.
ALTER TABLE billing_seller_media ADD CONSTRAINT fk_media_seller_id FOREIGN KEY (seller_id) REFERENCES crm_seller (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

ALTER TABLE billing_seller_media ADD CONSTRAINT fk_seller_media_id FOREIGN KEY (media_id) REFERENCES cpq_media (id) ON UPDATE NO ACTION ON DELETE NO ACTION;

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-15849_20230509_FK', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2689, '9:9b8830746e0d25fe51184e662ee82e1e', 'addForeignKeyConstraint baseTableName=billing_seller_media, constraintName=fk_media_seller_id, referencedTableName=crm_seller; addForeignKeyConstraint baseTableName=billing_seller_media, constraintName=fk_seller_media_id, referencedTableName=cpq_m...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-16366_20230529_fk::zelmeliani
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_pli_line FOREIGN KEY (price_list_line_id) REFERENCES cat_price_list_line (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-16366_20230529_fk', 'zelmeliani', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2691, '9:b6bb5cdee120649ad024964c1d2bd979', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_pli_line, referencedTableName=cat_price_list_line', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-17149_04072023_fk::Mbarek-Ay
ALTER TABLE cpq_quote_price ADD CONSTRAINT price_plan_matrix_version_fk FOREIGN KEY (price_plan_matrix_version_id) REFERENCES cpq_price_plan_version (id);

ALTER TABLE cpq_quote_price ADD CONSTRAINT price_plan_matrix_line_id_fk FOREIGN KEY (price_plan_matrix_line_id) REFERENCES cpq_price_plan_matrix_line (id);

ALTER TABLE cpq_quote_price ADD CONSTRAINT contract_item_fk FOREIGN KEY (contract_item_id) REFERENCES cpq_contract_item (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-17149_04072023_fk', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2693, '9:8aeb561bf05dc90e249c5f279df0f00e', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=price_plan_matrix_version_fk, referencedTableName=cpq_price_plan_version; addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=price_plan_matrix_line_id_fk, ref...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::INTRD-17487_20230719_fk::TarikFA.
ALTER TABLE contract_item_articles ADD CONSTRAINT contract_item_articles_item_id_fk FOREIGN KEY (contract_item_id) REFERENCES cpq_contract_item (id);

ALTER TABLE contract_item_articles ADD CONSTRAINT contract_item_articles_accounting_article_id_fk FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('INTRD-17487_20230719_fk', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2695, '9:a960d257314b1d85540e4a662ce2e64d', 'addForeignKeyConstraint baseTableName=contract_item_articles, constraintName=contract_item_articles_item_id_fk, referencedTableName=cpq_contract_item; addForeignKeyConstraint baseTableName=contract_item_articles, constraintName=contract_item_artic...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-17632_2023_08_09_fk::zbariki
ALTER TABLE billing_offer_amount ADD CONSTRAINT billing_offer_amount_offer_id_fk FOREIGN KEY (offer_id) REFERENCES cat_offer_template (id);

ALTER TABLE billing_offer_amount ADD CONSTRAINT billing_offer_amount_br_report_id_fk FOREIGN KEY (billing_run_report_id) REFERENCES billing_run_report (id);

ALTER TABLE billing_account_amount ADD CONSTRAINT billing_account_amount_offer_id_fk FOREIGN KEY (billing_account_id) REFERENCES billing_billing_account (id);

ALTER TABLE billing_account_amount ADD CONSTRAINT billing_account_amount_br_report_id_fk FOREIGN KEY (billing_run_report_id) REFERENCES billing_run_report (id);

ALTER TABLE billing_run_report ADD CONSTRAINT billing_run_report_billing_run_id_fk FOREIGN KEY (billing_run_id) REFERENCES billing_billing_run (id);

ALTER TABLE billing_billing_run ADD CONSTRAINT billing_billing_run_pre_invoicing_report_id_fk FOREIGN KEY (pre_invoicing_report_id) REFERENCES billing_run_report (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-17632_2023_08_09_fk', 'zbariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2697, '9:375db885a6d260ba4c896c22e3eeaa8e', 'addForeignKeyConstraint baseTableName=billing_offer_amount, constraintName=billing_offer_amount_offer_id_fk, referencedTableName=cat_offer_template; addForeignKeyConstraint baseTableName=billing_offer_amount, constraintName=billing_offer_amount_br...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-17632_2023_09_11_fk::zbariki
ALTER TABLE product_amount ADD CONSTRAINT product_amount_product_id_fk FOREIGN KEY (product_id) REFERENCES cpq_product (id);

ALTER TABLE product_amount ADD CONSTRAINT product_amount_br_report_id_fk FOREIGN KEY (billing_run_report_id) REFERENCES billing_run_report (id);

ALTER TABLE subscription_amount ADD CONSTRAINT subscription_amount_subscription_id_fk FOREIGN KEY (subscription_id) REFERENCES billing_subscription (id);

ALTER TABLE subscription_amount ADD CONSTRAINT subscription_amount_br_report_id_fk FOREIGN KEY (billing_run_report_id) REFERENCES billing_run_report (id);

ALTER TABLE accounting_article_amount ADD CONSTRAINT accounting_article_amount_accounting_article_id_fk FOREIGN KEY (accounting_article_id) REFERENCES billing_accounting_article (id);

ALTER TABLE accounting_article_amount ADD CONSTRAINT accounting_article_amount_br_report_id_fk FOREIGN KEY (billing_run_report_id) REFERENCES billing_run_report (id);

ALTER TABLE pdp_status ADD CONSTRAINT fk_pdp_status_invoice FOREIGN KEY (invoice_id) REFERENCES billing_invoice (id);

ALTER TABLE billing_invoice ADD CONSTRAINT fk_invoice_pdp_status_id FOREIGN KEY (pdp_status_id) REFERENCES billing_invoice (id);

ALTER TABLE pdp_status_and_history ADD CONSTRAINT fk_pdp_status_its_history_id FOREIGN KEY (pdpstatus_id) REFERENCES pdp_status (id);

ALTER TABLE pdp_status_and_history ADD CONSTRAINT fk_pdp_status_history_id FOREIGN KEY (history_id) REFERENCES pdp_status_history (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-17632_2023_09_11_fk', 'zbariki', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2699, '9:54f0a881082eab42ed91c8c8b6ccf4b6', 'addForeignKeyConstraint baseTableName=product_amount, constraintName=product_amount_product_id_fk, referencedTableName=cpq_product; addForeignKeyConstraint baseTableName=product_amount, constraintName=product_amount_br_report_id_fk, referencedTabl...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-18439_20230120_FK::TarikFA.
ALTER TABLE billing_chrg_inst_counter ADD CONSTRAINT fk_billing_chrg_inst_counter_chrg_instance_id FOREIGN KEY (chrg_instance_id) REFERENCES billing_charge_instance (id);

ALTER TABLE billing_chrg_inst_counter ADD CONSTRAINT fk_billing_chrg_inst_counter_counter_instance_id FOREIGN KEY (counter_instance_id) REFERENCES billing_counter (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-18439_20230120_FK', 'TarikFA.', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2701, '9:c0225c30baa1126d42aeb99e64c24464', 'addForeignKeyConstraint baseTableName=billing_chrg_inst_counter, constraintName=fk_billing_chrg_inst_counter_chrg_instance_id, referencedTableName=billing_charge_instance; addForeignKeyConstraint baseTableName=billing_chrg_inst_counter, constraint...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-9066_20231009-rebuild-fk::AbdellatifBARI
ALTER TABLE batch_entity ADD CONSTRAINT fk_batch_entity_job_instance FOREIGN KEY (job_instance_id) REFERENCES meveo_job_instance (id);

ALTER TABLE batch_entity ADD CONSTRAINT fk_batch_entity_job_execution FOREIGN KEY (job_execution_id) REFERENCES job_execution (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-9066_20231009-rebuild-fk', 'AbdellatifBARI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2703, '9:d4835fb878849de32f82f20006c41f9c', 'addForeignKeyConstraint baseTableName=batch_entity, constraintName=fk_batch_entity_job_instance, referencedTableName=meveo_job_instance; addForeignKeyConstraint baseTableName=batch_entity, constraintName=fk_batch_entity_job_execution, referencedTa...', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-18966_20231018-rebuild-fk::AbdellatifBARI
ALTER TABLE billing_wallet_operation ADD CONSTRAINT fk_billing_wallet_operation_batch_entity FOREIGN KEY (batch_entity_id) REFERENCES batch_entity (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-18966_20231018-rebuild-fk', 'AbdellatifBARI', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2705, '9:7e6e2eafde01ed6001d509e62dbe8119', 'addForeignKeyConstraint baseTableName=billing_wallet_operation, constraintName=fk_billing_wallet_operation_batch_entity, referencedTableName=batch_entity', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-19244_27102023_fk::Mbarek-Ay
ALTER TABLE cpq_quote_price ADD CONSTRAINT fk_quote_price_tax FOREIGN KEY (tax_id) REFERENCES billing_tax (id);

ALTER TABLE order_price ADD CONSTRAINT fk_order_price_tax FOREIGN KEY (tax_id) REFERENCES billing_tax (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-19244_27102023_fk', 'Mbarek-Ay', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2707, '9:deb50a7d3b01af5507433fab1f56fb34', 'addForeignKeyConstraint baseTableName=cpq_quote_price, constraintName=fk_quote_price_tax, referencedTableName=billing_tax; addForeignKeyConstraint baseTableName=order_price, constraintName=fk_order_price_tax, referencedTableName=billing_tax', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-20501_20240104_fk::AdilElJaouhari
ALTER TABLE billing_rated_transaction ADD CONSTRAINT fk_rated_transaction_order_product FOREIGN KEY (order_product_id) REFERENCES cpq_order_product (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-20501_20240104_fk', 'AdilElJaouhari', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2709, '9:be6226fc9f8d10052164fceabaa63fad', 'addForeignKeyConstraint baseTableName=billing_rated_transaction, constraintName=fk_rated_transaction_order_product, referencedTableName=cpq_order_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-20725_20240112_fk::AdilElJaouhari
ALTER TABLE billing_service_instance ADD CONSTRAINT fk_service_instance_order_product FOREIGN KEY (order_product_id) REFERENCES cpq_order_product (id);

INSERT INTO databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('#INTRD-20725_20240112_fk', 'AdilElJaouhari', 'src/main/resources/db_resources/changelog/rebuild/structure.xml', NOW(), 2711, '9:922100d106cc12205ca230334bcce4aa', 'addForeignKeyConstraint baseTableName=billing_service_instance, constraintName=fk_service_instance_order_product, referencedTableName=cpq_order_product', '', 'EXECUTED', NULL, NULL, '4.29.0', '4658469362');

-- Changeset src/main/resources/db_resources/changelog/rebuild/structure.xml::#INTRD-21452_20240209_build::TarikFA.
