plantuml2mysql icon indicating copy to clipboard operation
plantuml2mysql copied to clipboard

Primary Key

Open vijvipin opened this issue 6 years ago • 4 comments

Firstly thank you for this code. Helped a lot. There is an issue here, the code generates the Primary key code even if I have not defined any in the UML using '#' I am working to resolve this issue, not sure if already resolved.

vijvipin avatar Jul 17 '19 12:07 vijvipin

Thank you for the report! PR will be welcomed.

grafov avatar Jul 18 '19 16:07 grafov

Hell Grafov, Hope you doing well. I did some analysis and could find a solution. Please check the following code. What I have also done is that code will now also put a 'GO' after each creates table statement ends. Let me push my code as well

if field and l == "}": table = False; field = False if primary: #Vijvipin print(" PRIMARY KEY (%s)" % ", ".join(primary), end="") if index: print(",\n%s" % index[:-2],) index = "" print(");\n") print("GO\n") #Vijvipin continue

vijvipin avatar Aug 23 '19 07:08 vijvipin

Hello Grefov, I have created a new pull request with the changes to solve the above issue.

vijvipin avatar Feb 14 '20 18:02 vijvipin

Ok, I have left comments in the review.

grafov avatar Feb 16 '20 18:02 grafov