https://kotlinlang.org logo
s

Stylianos Gakis

10/03/2022, 10:18 PM
Using SQLDelight 1.5.3 along with the same version of the SQLDelight IDE Plugin, I got a trivial example where one file named
Achievement.sq
is
Copy code
CREATE TABLE achievement (two rows here...);
And another named
1.sqm
is
Copy code
ALTER TABLE achievement
...;
And it highlights
achievement
in “ALTER TABLE achievement” as
No table found with name achievement
. Tested with AS Flamingo Canary 1 and IntelliJ Ultimate 2022.2.2. Is this a problem on my end or is the IDE Plugin known to be like this? I know v2 is in active development atm as I saw a release an hour ago or so, so I wonder if things are more or less stable there and if you’d suggest I’d rather go with that one instead. It’s for a hobby project so no problem going with an Alpha. Note that this is simply a Plugin false positive, running the app and everything else works fine
a

alec

10/03/2022, 10:44 PM
yea IDE features should probably be turned off in this case
you need
1.db
for everything to function properly
which you can generate with the
generateSqlDelightSchema
task
would have needed to be done before writing 1.db though
though you can run it now to generate 2.db and then sqm files going forward should be fine
s

Stylianos Gakis

10/04/2022, 9:42 PM
Aha interesting! I think it all clicks now, I realize what the generated tasks are doing plus what the plugin configuration options are for. I have to admit at first time going through the documentation for migrations and such this was not clear, but I can probably attribute this to the fact that I am personally not familiar with a lot of concepts regarding databases etc. And I got this working exactly as you described, now the migration check task works for me, plus the IDE is no longer giving false positive errors after I’ve correctly generated my .db file. Thanks a ton for the help!
a

alec

10/05/2022, 4:13 PM
👍 yea i haven't found a good way to document these things that clicks for everyone
24 Views