mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 14:35:52 +01:00
(refs #114)Add logical remove flag to ACCOUNT.
This commit is contained in:
1
src/main/resources/update/1_8.sql
Normal file
1
src/main/resources/update/1_8.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE ACCOUNT ADD COLUMN REMOVED BOOLEAN DEFAULT FALSE;
|
||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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,11 +102,8 @@ object AutoUpdate {
|
|||||||
}
|
}
|
||||||
case _ => Version(0, 0)
|
case _ => Version(0, 0)
|
||||||
}
|
}
|
||||||
} else {
|
} else Version(0, 0)
|
||||||
Version(0, 0)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user