Replaced Ints with Longs as database Ids.
This commit is contained in:
@@ -8,7 +8,7 @@ import slick.model.ForeignKeyAction.{Cascade, Restrict}
|
||||
import java.time.Instant
|
||||
|
||||
class UsersTable(tag: Tag) extends Table[User](tag, "users") {
|
||||
def id = column[Int]("id", O.PrimaryKey, O.AutoInc)
|
||||
def id = column[Long]("id", O.PrimaryKey, O.AutoInc)
|
||||
def gid = column[String]("gid", O.Unique)
|
||||
def username = column[String]("username", O.Unique)
|
||||
def passwordDigest = column[Option[String]]("password_digest")
|
||||
@@ -20,8 +20,8 @@ lazy val Users = TableQuery[UsersTable]
|
||||
|
||||
class AuthTokensTable(tag: Tag) extends Table[AuthToken](tag, "auth_tokens") {
|
||||
|
||||
def id = column[Int]("id", O.PrimaryKey, O.AutoInc)
|
||||
def userId = column[Int]("user_id")
|
||||
def id = column[Long]("id", O.PrimaryKey, O.AutoInc)
|
||||
def userId = column[Long]("user_id")
|
||||
def token = column[String]("token")
|
||||
def createdAt = column[Instant]("created_at")
|
||||
def expiresAt = column[Instant]("expires_at")
|
||||
@@ -40,11 +40,11 @@ implicit val auctionStatusColumnType: BaseColumnType[AuctionStatus] =
|
||||
)
|
||||
|
||||
class AuctionsTable(tag: Tag) extends Table[Auction](tag, "auctions") {
|
||||
def id = column[Int]("id", O.PrimaryKey, O.AutoInc)
|
||||
def id = column[Long]("id", O.PrimaryKey, O.AutoInc)
|
||||
def name = column[String]("name")
|
||||
def status = column[AuctionStatus]("status")
|
||||
def gid = column[String]("gid", O.Unique)
|
||||
def authorId = column[Int]("author_id")
|
||||
def authorId = column[Long]("author_id")
|
||||
def startingPrice = column[BigDecimal]("starting_price", O.SqlType("DECIMAL(20, 3)"))
|
||||
def currentBid = column[Option[BigDecimal]]("current_bid", O.SqlType("DECIMAL(20, 3)"))
|
||||
def currentBidderId = column[Option[Int]]("current_bidder_id")
|
||||
|
||||
Reference in New Issue
Block a user