@@ -11,7 +11,7 @@ import com.nutomic.ensichat.core.routing.Address
11
11
import com .typesafe .scalalogging .Logger
12
12
import org .joda .time
13
13
import org .joda .time .DateTime
14
- import slick .driver . H2Driver .api ._
14
+ import slick .jdbc . H2Profile .api ._
15
15
16
16
import scala .concurrent .Await
17
17
import scala .concurrent .duration .Duration
@@ -40,7 +40,7 @@ class Database(path: File, settings: SettingsInterface, callbackInterface: Callb
40
40
def date = column[Long ](" date" )
41
41
def tokens = column[Int ](" tokens" )
42
42
def confirmedDelivered = column[Boolean ](" confirmed_delivered" )
43
- def * = (origin, target, messageId, text, date, tokens, confirmedDelivered) <> [(Message , Boolean ), ( String , String , Long , String , Long , Int , Boolean ) ]( {
43
+ def * = (origin, target, messageId, text, date, tokens, confirmedDelivered) <> [(Message , Boolean )]( {
44
44
tuple =>
45
45
val header = new ContentHeader (new Address (tuple._1),
46
46
new Address (tuple._2),
@@ -63,15 +63,15 @@ class Database(path: File, settings: SettingsInterface, callbackInterface: Callb
63
63
def address = column[String ](" address" , O .PrimaryKey )
64
64
def name = column[String ](" name" )
65
65
def status = column[String ](" status" )
66
- def wrappedAddress = address <> [Address , String ](new Address (_), a => Option (a.toString))
66
+ def wrappedAddress = address <> [Address ](new Address (_), a => Option (a.toString))
67
67
def * = (wrappedAddress, name, status) <> (User .tupled, User .unapply)
68
68
}
69
69
private val contacts = TableQuery [Contacts ]
70
70
71
71
private class KnownDevices (tag : Tag ) extends Table [(Address , time.Duration )](tag, " KNOWN_DEVICES" ) {
72
72
def address = column[String ](" address" , O .PrimaryKey )
73
73
def totalConnectionSeconds = column[Long ](" total_connection_seconds" )
74
- def * = (address, totalConnectionSeconds) <> [(Address , time.Duration ), ( String , Long ) ](
74
+ def * = (address, totalConnectionSeconds) <> [(Address , time.Duration )](
75
75
tuple => (new Address (tuple._1), time.Duration .standardSeconds(tuple._2)),
76
76
tuple => Option ((tuple._1.toString, tuple._2.getStandardSeconds)))
77
77
}
0 commit comments