Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL: handle panic upon unique constraint #18

Closed
tyt2y3 opened this issue Sep 23, 2021 · 1 comment
Closed

MySQL: handle panic upon unique constraint #18

tyt2y3 opened this issue Sep 23, 2021 · 1 comment

Comments

@tyt2y3
Copy link
Member

tyt2y3 commented Sep 23, 2021

SeaQL/sea-orm#191

Schema to reproduce:

CREATE TABLE `table_2` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `table_1` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `table_2_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `table_2_id` (`table_2_id`),
  CONSTRAINT `table_2_id` FOREIGN KEY (`table_2_id`) REFERENCES `table_2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
tyt2y3 added a commit that referenced this issue Sep 23, 2021
@tyt2y3 tyt2y3 changed the title MySQL: support unique constraint MySQL: handle panic upon unique constraint Sep 23, 2021
@tyt2y3
Copy link
Member Author

tyt2y3 commented Sep 23, 2021

Seemingly resolved.

@tyt2y3 tyt2y3 closed this as completed Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant