(refs #114)Add logical remove flag to ACCOUNT.

This commit is contained in:
takezoe
2013-11-01 03:38:33 +09:00
parent c7eaebf597
commit 4f10bccf84
3 changed files with 8 additions and 7 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE ACCOUNT ADD COLUMN REMOVED BOOLEAN DEFAULT FALSE;

View File

@@ -14,7 +14,8 @@ object Accounts extends Table[Account]("ACCOUNT") {
def lastLoginDate = column[java.util.Date]("LAST_LOGIN_DATE") def lastLoginDate = column[java.util.Date]("LAST_LOGIN_DATE")
def image = column[String]("IMAGE") def image = column[String]("IMAGE")
def groupAccount = column[Boolean]("GROUP_ACCOUNT") def groupAccount = column[Boolean]("GROUP_ACCOUNT")
def * = userName ~ fullName ~ mailAddress ~ password ~ isAdmin ~ url.? ~ registeredDate ~ updatedDate ~ lastLoginDate.? ~ image.? ~ groupAccount <> (Account, Account.unapply _) def removed = column[Boolean]("REMOVED")
def * = userName ~ fullName ~ mailAddress ~ password ~ isAdmin ~ url.? ~ registeredDate ~ updatedDate ~ lastLoginDate.? ~ image.? ~ groupAccount ~ removed <> (Account, Account.unapply _)
} }
case class Account( case class Account(
@@ -28,5 +29,6 @@ case class Account(
updatedDate: java.util.Date, updatedDate: java.util.Date,
lastLoginDate: Option[java.util.Date], lastLoginDate: Option[java.util.Date],
image: Option[String], image: Option[String],
isGroupAccount: Boolean isGroupAccount: Boolean,
isRemoved: Boolean
) )

View File

@@ -50,6 +50,7 @@ object AutoUpdate {
* The history of versions. A head of this sequence is the current BitBucket version. * The history of versions. A head of this sequence is the current BitBucket version.
*/ */
val versions = Seq( val versions = Seq(
Version(1, 8),
Version(1, 7), Version(1, 7),
Version(1, 6), Version(1, 6),
Version(1, 5), Version(1, 5),
@@ -101,10 +102,7 @@ object AutoUpdate {
} }
case _ => Version(0, 0) case _ => Version(0, 0)
} }
} else { } else Version(0, 0)
Version(0, 0)
}
} }
} }