Skip to content
Browse files

Quote `SqlType` argument in code generator.

Fixes #972.
  • Loading branch information
szeiger committed Jan 29, 2015
1 parent b1dca21 commit 20378ecfb58b6f49a4171cd4f154c84b04591877
@@ -156,7 +156,7 @@ class $name(_tableTag: Tag) extends Table[$elementType](_tableTag, ${args.mkStri
def columnOptionCode = {
case ColumnOption.PrimaryKey => Some(s"O.PrimaryKey")
case Default(value) => Some(s"O.Default(${default.get})") // .get is safe here
case SqlType(dbType) => Some(s"O.SqlType($dbType)")
case SqlType(dbType) => Some(s"""O.SqlType("$dbType")""")
case Length(length,varying) => Some(s"O.Length($length,varying=$varying)")
case AutoInc => Some(s"O.AutoInc")
case NotNull|Nullable => throw new SlickException( s"Please don't use Nullable or NotNull column options. Use an Option type, respectively the nullable flag in Slick's model model Column." )

0 comments on commit 20378ec

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