(refs #564)Change the attached files directory to /commens from /issues

This commit is contained in:
takezoe
2014-11-28 00:20:46 +09:00
parent c23985c1a7
commit 63627fc1d0
2 changed files with 16 additions and 2 deletions

View File

@@ -53,7 +53,21 @@ object AutoUpdate {
* The history of versions. A head of this sequence is the current BitBucket version.
*/
val versions = Seq(
new Version(2, 7),
new Version(2, 7) {
override def update(conn: Connection): Unit = {
super.update(conn)
using(conn.createStatement.executeQuery("SELECT USER_NAME, REPOSITORY_NAME FROM REPOSITORY")){ rs =>
while(rs.next){
defining(Directory.getAttachedDir(rs.getString("USER_NAME"), rs.getString("REPOSITORY_NAME"))){ newDir =>
val oldDir = new File(newDir.getParentFile, "issues")
if(oldDir.exists && oldDir.isDirectory){
oldDir.renameTo(newDir)
}
}
}
}
}
},
new Version(2, 6),
new Version(2, 5),
new Version(2, 4),