Title: renamed foreign key table definition constraint issue · Issue #518 · datajoint/datajoint-python · GitHub
Open Graph Title: renamed foreign key table definition constraint issue · Issue #518 · datajoint/datajoint-python
X Title: renamed foreign key table definition constraint issue · Issue #518 · datajoint/datajoint-python
Description: 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'...
Open Graph Description: 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...
X Description: 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(...
Opengraph URL: https://github.com/datajoint/datajoint-python/issues/518
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"renamed foreign key table definition constraint issue","articleBody":"defining a renamed foreign key reference to a partial key defined in:\r\n```@schema\r\nclass Animal(dj.Manual):\r\n definition = \"\"\"\r\n animal_id : char(16)\r\n datasource_id=0: int\r\n ---\r\n animal_species: varchar(16)\r\n animal_name: varchar(128)\r\n animal_sex: ENUM('M', 'F', 'U')\r\n animal_dob=NULL: date\r\n -\u003e AnimalColor\r\n \"\"\"\r\n```\r\nvia:\r\n```\r\n@schema\r\nclass Dam(dj.Manual):\r\n definition = \"\"\"\r\n -\u003e Animal\r\n (dam_id) -\u003e Animal(animal_id)\r\n \"\"\"\r\n```\r\nyields:\r\n```\r\nCREATE 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 \"\";\r\n```\r\nand therefore this:\r\n```pymysql.err.IntegrityError: (1215, 'Cannot add foreign key constraint')\r\n```\r\n\r\n#517 code resolves issue.\r\n","author":{"url":"https://github.com/ixcat","@type":"Person","name":"ixcat"},"datePublished":"2018-11-14T02:01:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/518/datajoint-python/issues/518"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b8e72fd-5adf-df36-4ed3-448527c99c53 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC58:82F2D:4B9CEC:661C4F:6A4DA43A |
| html-safe-nonce | 5351338d9f50eeefaf093e03cba7d53e5ff3767101161c1f2db88103bb3e9d2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzU4OjgyRjJEOjRCOUNFQzo2NjFDNEY6NkE0REE0M0EiLCJ2aXNpdG9yX2lkIjoiODY5NzM1MzI4ODA5NTkxODY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1f75bfc240e406bb48fc4b620337544cb5fc9e2bd12577e02c2081fb3c285881 |
| hovercard-subject-tag | issue:380503058 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datajoint/datajoint-python/518/issue_layout |
| twitter:image | https://opengraph.githubassets.com/56b3e52b7c5d1deaf40e261d01ca78c7fef0b2f73666e2f3db1ba1c7be8c5551/datajoint/datajoint-python/issues/518 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/56b3e52b7c5d1deaf40e261d01ca78c7fef0b2f73666e2f3db1ba1c7be8c5551/datajoint/datajoint-python/issues/518 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ixcat |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git |
| octolytics-dimension-user_id | 2375501 |
| octolytics-dimension-user_login | datajoint |
| octolytics-dimension-repository_id | 5866704 |
| octolytics-dimension-repository_nwo | datajoint/datajoint-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 5866704 |
| octolytics-dimension-repository_network_root_nwo | datajoint/datajoint-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f13faa65cccc9b729d674da83335d5dcfdfd193 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width