6
votes

I am new in scala slick .
why can not found column and O in slick v3.1.1
please view this example code :

import slick.driver.PostgresDriver
import slick.lifted.Tag
import slick.model.Table ;

case class Person(id:Int,name:String)

class Persons(tag: Tag) extends Table[Person](tag , "PERSONS") {
    def id = column[Long]("id", O.PrimaryKey, O.AutoInc)
    def name = column[String]("name", O.NotNull)
}    

Update :
I use this document : http://slick.lightbend.com/doc/3.1.1/gettingstarted.html#schema

2

2 Answers

5
votes

Simply change your import to:

import slick.driver.PostgresDriver.api._

Looking at your code - this should be the only import that you should need (at least at this stage).

0
votes

For the latest versions of slick you can use:

import slick.jdbc.PostgresProfile.api._

So you don't see the deprecated message