Use DatabaseConfig . Since the Slick documentation says:
In addition to the configuration syntax for Database , there is another layer in the form of DatabaseConfig , which allows you to configure the Slick driver along with the corresponding database. This simplifies the abstract across various types of database systems with the help of simply modifying the configuration file.
Instead of importing specific database drivers, first get DatabaseConfig :
val dbConfig = DatabaseConfig.forConfig[JdbcProfile]("<db_name>")
And then import the api from it:
import dbConfig.driver.api._
source share