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

Creating a table named 'Transaction' causes migration issue on iOS #1629

Closed
dcoletto opened this issue Mar 13, 2020 · 0 comments · Fixed by AlecKazakova/sql-psi#257
Closed

Comments

@dcoletto
Copy link

An SQL statement like CREATE TABLE transaction (...); will lead to migration issue at runtime on iOS only. Renaming the table fixed the issue, table fields are not related.

Personal supposition here, which could be totally wrong:
I think that the issue is caused by the fact that swift (maybe even objc, I can't remember this) doesn't have the package structure which java has. Since there is already a class called Transaction in sqldelight (the one for handling db transaction) creating a table named transaction will lead to the creation of another class with the same name, and this could probably cause this strange behaviour.
Having the gradle plugin checking for tables with this name and blocking this issue at compile time would be nice, even if you are not working on K/N (so if one day you decide to move your android project on iOS you won't have the issue)

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

Successfully merging a pull request may close this issue.

2 participants