I am using Slick code generator. with Postgresql. slick generates
lazy val ddl = table1.ddl ++ table2.ddl ++ table3.ddl ++ table4.ddl
Now writing a beforeEach()
override def beforeEach() {
testdb withSession { implicit session =>
ddl.drop
ddl.create
}
In running ddl
it throws sql exceptions due to it trying to create tables which have foreign key on other tables which aren't yet created. how do you run slick created ddl
to get away with this issue? I would imagine this to be a common situation of how you use ddl
in slick