Open ejulen opened 4 years ago
Yeah. This is definitely the case. I'd accept a PR to fix this, but I'm hardly interested in maintaining these tests to fit everyone's database. They were a nice idea, but unfortunately it depends too much on the shape of everyone's databases - much moreso than just using sqlboiler itself.
If you're having a generation problem please answer these questions before submitting your issue. Thanks!
What version of SQLBoiler are you using (
sqlboiler --version
)?4.1.2
What is your database and version (eg. Postgresql 10)
MariaDB 10.5.3
Please provide a relevant database schema so we can replicate your issue (Provided you are comfortable sharing this)
Further information. What did you do, what did you expect?
I ran
go test ./models
after generating them and got the following error:Looks like this line could be responsible. When manipulating the output of
mysqldump
that pattern combined withfKeyDestroyer
breaks the SQL (excerpt):(note the
CONSTRAINT
line)