I'm writing an app using slick and h2 in-memory db. I'd like to check how my data is written to db by creating database config in IntelliJ idea, but all the tables are missing.
Here is my code:
application.conf
h2mem = {
url = "jdbc:h2:mem:testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1"
driver = org.h2.Driver
connectionPool = disabled
}
Repository.scala
....
class TaskTable(tag: Tag) extends Table[Task](tag, "TASK") {
def id = column[Long]("ID", O.PrimaryKey, O.AutoInc)
def startTime = column[LocalTime]("START_TIME")
override def * = (id.?, startTime) <> (Task.tupled, Task.unapply)
}
....
Main.scala
....
val db = Database.forConfig("h2mem")
val repo= new Repo(H2Profile)
db.run(repo.createTaskTable)
...