Skip to content
Permalink
Browse files

codegen: schema: Handle case of no tables

Conflicts:
	slick-codegen/src/main/scala/slick/codegen/AbstractSourceCodeGenerator.scala
  • Loading branch information
nafg authored and szeiger committed Sep 1, 2015
1 parent ea04bba commit fd57431b68a15c61451c0a7d8a77bec155a8d0b1
Showing with 3 additions and 1 deletion.
  1. +3 −1 slick-codegen/src/main/scala/slick/codegen/AbstractSourceCodeGenerator.scala
@@ -28,8 +28,10 @@ abstract class AbstractSourceCodeGenerator(model: m.Model)
(
if(tables.length > 5)
"\nlazy val schema = Array(" + tables.map(_.TableValue.name + ".schema").mkString(", ") + ").reduceLeft(_ ++ _)"
else
else if(tables.nonEmpty)
"\nlazy val schema = " + tables.map(_.TableValue.name + ".schema").mkString(" ++ ")
else
"\nlazy val schema: profile.SchemaDescription = profile.DDL(Nil, Nil)"
) +
"\n@deprecated(\"Use .schema instead of .ddl\", \"3.0\")"+
"\ndef ddl = schema" +

0 comments on commit fd57431

Please sign in to comment.
You can’t perform that action at this time.