From 1068fe58707912c88ea311a4763ac12ed028337b Mon Sep 17 00:00:00 2001 From: ashok-conflux Date: Mon, 22 Apr 2013 12:41:45 +0530 Subject: [PATCH] added foreign key contraint for group and client in loan table --- ...d-group-client-foreign-key-constraint-in-loan-table.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 mifosng-db/migrations/core_db/V24__add-group-client-foreign-key-constraint-in-loan-table.sql diff --git a/mifosng-db/migrations/core_db/V24__add-group-client-foreign-key-constraint-in-loan-table.sql b/mifosng-db/migrations/core_db/V24__add-group-client-foreign-key-constraint-in-loan-table.sql new file mode 100644 index 000000000..ed923bc08 --- /dev/null +++ b/mifosng-db/migrations/core_db/V24__add-group-client-foreign-key-constraint-in-loan-table.sql @@ -0,0 +1,7 @@ +ALTER TABLE m_loan +ADD CONSTRAINT `fk_m_group_client_001` +FOREIGN KEY (`group_id` , `client_id` ) +REFERENCES m_group_client (`group_id` , `client_id` ) +ON DELETE NO ACTION +ON UPDATE NO ACTION +, ADD INDEX `fk_m_group_client_001_idx` (`group_id` ASC, `client_id` ASC) ; \ No newline at end of file