defining a renamed foreign key reference to a partial key defined in:
class Animal(dj.Manual): definition = """ animal_id : char(16) datasource_id=0: int --- animal_species: varchar(16) animal_name: varchar(128) animal_sex: ENUM('M', 'F', 'U') animal_dob=NULL: date -> AnimalColor """
via:
@schema class Dam(dj.Manual): definition = """ -> Animal (dam_id) -> Animal(animal_id) """
yields:
CREATE TABLE IF NOT EXISTS `tutorial_mlims_prod_ephys`.`dam` ( `animal_id` char(16) NOT NULL COMMENT "", `datasource_id` int NOT NULL COMMENT "", `dam_id` int NOT NULL COMMENT "", PRIMARY KEY (`animal_id`,`datasource_id`,`dam_id`), FOREIGN KEY (`animal_id`,`datasource_id`) REFERENCES `tutorial_mlims_prod_ephys`.`animal` (`animal_id`,`datasource_id`) ON UPDATE CASCADE ON DELETE RESTRICT, FOREIGN KEY (`datasource_id`,`dam_id`) REFERENCES `tutorial_mlims_prod_ephys`.`animal` (`animal_id`,`datasource_id`) ON UPDATE CASCADE ON DELETE RESTRICT ) ENGINE=InnoDB, COMMENT "";
and therefore this:
#517 code resolves issue.
@dimitri-yatsenko - FYI filed this on @eywalker request for documentation; as mentioned #517 code seems to fix currently.
This is a duplicate of #516. Closing.
Do not close when the reported error is being different. As already noted by @ixcat the underlying issue is known to be the same as in #516. Let this be closed by accepting the PR.
Merge pull request #517 from dimitri-yatsenko/master
Closing via #517
Activity
ixcat commented on Nov 14, 2018
@dimitri-yatsenko - FYI filed this on @eywalker request for documentation; as mentioned #517 code seems to fix currently.
dimitri-yatsenko commented on Nov 14, 2018
This is a duplicate of #516. Closing.
eywalker commented on Nov 14, 2018
Do not close when the reported error is being different. As already noted by @ixcat the underlying issue is known to be the same as in #516. Let this be closed by accepting the PR.
Merge pull request #517 from dimitri-yatsenko/master
dimitri-yatsenko commented on Nov 17, 2018
Closing via #517