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

Primary Key #3

Open
vijvipin opened this issue Jul 17, 2019 · 4 comments
Open

Primary Key #3

vijvipin opened this issue Jul 17, 2019 · 4 comments
Labels

Comments

@vijvipin
Copy link

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.

@grafov
Copy link
Owner

grafov commented Jul 18, 2019

Thank you for the report! PR will be welcomed.

@grafov grafov added the bug label Jul 18, 2019
@vijvipin
Copy link
Author

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
Copy link
Author

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

@grafov
Copy link
Owner

grafov commented Feb 16, 2020

Ok, I have left comments in the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants