I'm using Dropwizard and its JDBI module in order to connect to an SQLite database. I've setup the database so that it has FKs in place, but I still need to tell SQLite to enable its constraints.
I know you can configure it using a properties instance, but I don't see how to make use of that together with the JDBI setup in Dropwizard.
You need to add the following property to your .yml settings file:
foreign_keys: true
.It should look something like this:
After that you should have FK constraint in your SQLite database. You can check out the
SQLiteConfig
class for more properties.