ensure resource idenity is stored with a CREATE command source when command is processed by platform. Allows ability to see all state changing commands accepted to date by platform for a given resource.

This commit is contained in:
Keith Woodlock
2012-11-16 13:26:25 +00:00
parent e61454792f
commit ce188814ec
7 changed files with 542 additions and 405 deletions
@@ -1,47 +1,42 @@
-- example of a DDL script to support customised 'additional data' for clients and loans.
DROP TABLE IF EXISTS `additional client fields data`;
DROP TABLE IF EXISTS `extra family details data`;
DROP TABLE IF EXISTS `additional loan fields data`;
DROP TABLE IF EXISTS `m_client_xAdditional Information`;
DROP TABLE IF EXISTS `m_client_xHighly Improbable Info`;
DROP TABLE IF EXISTS `m_loan_xAdditional Information`;
CREATE TABLE `additional client fields data` (
`client_id` bigint(20) NOT NULL,
`Business Description` varchar(100) DEFAULT NULL,
`Years in Business` int(11) DEFAULT NULL,
`Gender_cd` int(11) DEFAULT NULL,
`Education_cv` varchar(60) DEFAULT NULL,
`Next Visit` date DEFAULT NULL,
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
`Comment` text,
PRIMARY KEY (`client_id`),
CONSTRAINT `FK_Additional Client Fields Data_1` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `m_client_xAdditional Information` (
CREATE TABLE `extra family details data` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`Ethnic Group` varchar(50) DEFAULT NULL,
`Ethnic Group Other` varchar(50) DEFAULT NULL,
`Household Location` varchar(50) DEFAULT NULL,
`Household Location Other` varchar(50) DEFAULT NULL,
`Religion` varchar(50) DEFAULT NULL,
`Religion Other` varchar(50) DEFAULT NULL,
`Knowledge of Person` varchar(50) DEFAULT NULL,
`Gender` varchar(10) DEFAULT NULL,
`Whois` mediumtext,
`client_id` bigint(20) NOT NULL,
`Name` varchar(40) DEFAULT NULL,
`Date of Birth` date DEFAULT NULL,
`Points Score` int(11) DEFAULT NULL,
`Education_cdHighest` int(11) DEFAULT NULL,
`Other Notes` text,
PRIMARY KEY (`id`),
CONSTRAINT `m_client_xAdditional Information_fk1` FOREIGN KEY (`id`) REFERENCES `m_client` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
KEY `FK_Extra Family Details Data_1` (`client_id`),
CONSTRAINT `FK_Extra Family Details Data_1` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
CREATE TABLE `m_client_xHighly Improbable Info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`Fathers Favourite Team` varchar(50) DEFAULT NULL,
`Mothers Favourite Team` varchar(50) DEFAULT NULL,
`Fathers DOB` date DEFAULT NULL,
`Mothers DOB` date DEFAULT NULL,
`Fathers Education` varchar(50) DEFAULT NULL,
`Mothers Education` varchar(50) DEFAULT NULL,
`Number of Children` int(11) DEFAULT NULL,
`Favourite Town` varchar(30) DEFAULT NULL,
`Closing Comments` mediumtext,
`Annual Family Income` decimal(19,6) DEFAULT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `m_client_xHighly Improbable Info_fk1` FOREIGN KEY (`id`) REFERENCES `m_client` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `m_loan_xAdditional Information` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`Business Location` varchar(50) DEFAULT NULL,
`Business Location Other` varchar(50) DEFAULT NULL,
`Business` varchar(10) DEFAULT NULL,
`Business Description` mediumtext,
`Business Title` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `m_loan_xAdditional Information_fk1` FOREIGN KEY (`id`) REFERENCES `m_loan` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `additional loan fields data` (
`loan_id` bigint(20) NOT NULL,
`Business Description` varchar(100) DEFAULT NULL,
`Years in Business` int(11) DEFAULT NULL,
`Gender_cd` int(11) DEFAULT NULL,
`Education_cv` varchar(60) DEFAULT NULL,
`Next Visit` date DEFAULT NULL,
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
`Comment` text,
PRIMARY KEY (`loan_id`),
CONSTRAINT `FK_Additional Loan Fields Data_1` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;