Commit a5aedfa9 authored by Liang Ding's avatar Liang Ding

🔖 Release 2.1.0

parent 6e224d7c
......@@ -5,6 +5,16 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h2>Release 2.1.0 - May 25, 2017</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12284">12284 H2 SQL 文件导出</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
<li><a href="https://github.com/b3log/solo/issues/12280">12280 社区同步过来的评论加入头像</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12285">12285 移除 HTML 编辑器</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12273">12273 重新整理文档</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12278">12278 新的 Logo</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12274">12274 更新分类标签计数错误</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12295">12295 并发请求报错</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
</ul>
<h2>Release 2.0.0 - Apr 14, 2017</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12256">12256 支持文章分类</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: Solo POM.
Version: 3.16.1.37, May 13, 2017
Version: 3.16.1.38, May 25, 2017
Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
Author: <a href="http://vanessa.b3log.org">Vanessa</a>
......@@ -14,9 +14,9 @@
<artifactId>solo</artifactId>
<packaging>war</packaging>
<name>Solo</name>
<version>2.0.0</version>
<version>2.1.0</version>
<description>
A blogging system written in Java, feel free to create your or your team own blog. 一个用 Java 实现的博客系统,为你或你的团队创建个博客吧
A blogging system written in Java, feel free to create your or your team own blog. 一个用 Java 实现的博客系统,为你或你的团队创建个博客吧
</description>
<inceptionYear>2010</inceptionYear>
......
......@@ -63,7 +63,7 @@ import java.util.concurrent.locks.ReentrantLock;
* Solo Servlet listener.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.9.3.20, May 20, 2017
* @version 1.9.3.21, May 25, 2017
* @since 0.3.1
*/
public final class SoloServletListener extends AbstractServletListener {
......@@ -71,7 +71,7 @@ public final class SoloServletListener extends AbstractServletListener {
/**
* Solo version.
*/
public static final String VERSION = "2.0.0";
public static final String VERSION = "2.1.0";
/**
* JSONO print indent factor.
......
......@@ -51,7 +51,7 @@ import java.sql.Statement;
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="mailto:dongxu.wang@acm.org">Dongxu Wang</a>
* @version 1.2.0.12, May 2, 2017
* @version 1.2.0.13, May 25, 2017
* @since 1.2.0
*/
@Service
......@@ -75,7 +75,7 @@ public class UpgradeService {
/**
* Old version.
*/
private static final String FROM_VER = "1.9.0";
private static final String FROM_VER = "2.0.0";
/**
* New version.
......@@ -169,39 +169,15 @@ public class UpgradeService {
Transaction transaction = null;
try {
final Connection connection = Connections.getConnection();
final Statement statement = connection.createStatement();
final String tablePrefix = Latkes.getLocalProperty("jdbc.tablePrefix") + "_";
statement.execute("CREATE TABLE `" + tablePrefix + "category` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `categoryTitle` varchar(64) NOT NULL,\n" +
" `categoryURI` varchar(32) NOT NULL,\n" +
" `categoryDescription` text NOT NULL,\n" +
" `categoryOrder` int(11) NOT NULL,\n" +
" `categoryTagCnt` int(11) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.execute("CREATE TABLE `" + tablePrefix + "category_tag` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `category_oId` varchar(19) NOT NULL,\n" +
" `tag_oId` varchar(19) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.close();
connection.commit();
connection.close();
transaction = optionRepository.beginTransaction();
final JSONObject versionOpt = optionRepository.get(Option.ID_C_VERSION);
versionOpt.put(Option.OPTION_VALUE, TO_VER);
optionRepository.update(Option.ID_C_VERSION, versionOpt);
// https://github.com/b3log/solo/issues/12285
// final JSONObject editorTypeOpt = optionRepository.get(Option.ID_C_EDITOR_TYPE);
// editorTypeOpt.put(Option.OPTION_VALUE, Option.DefaultPreference.DEFAULT_EDITOR_TYPE);
// optionRepository.update(Option.ID_C_EDITOR_TYPE, editorTypeOpt);
final JSONObject editorTypeOpt = optionRepository.get(Option.ID_C_EDITOR_TYPE);
editorTypeOpt.put(Option.OPTION_VALUE, Option.DefaultPreference.DEFAULT_EDITOR_TYPE);
optionRepository.update(Option.ID_C_EDITOR_TYPE, editorTypeOpt);
transaction.commit();
......@@ -218,6 +194,36 @@ public class UpgradeService {
LOGGER.log(Level.INFO, "Upgraded from version [{0}] to version [{1}] successfully :-)", FROM_VER, TO_VER);
}
/**
* Upgrade database tables.
*
* @throws Exception exception
*/
private void upgradeTables() throws Exception {
final Connection connection = Connections.getConnection();
final Statement statement = connection.createStatement();
final String tablePrefix = Latkes.getLocalProperty("jdbc.tablePrefix") + "_";
statement.execute("CREATE TABLE `" + tablePrefix + "category` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `categoryTitle` varchar(64) NOT NULL,\n" +
" `categoryURI` varchar(32) NOT NULL,\n" +
" `categoryDescription` text NOT NULL,\n" +
" `categoryOrder` int(11) NOT NULL,\n" +
" `categoryTagCnt` int(11) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.execute("CREATE TABLE `" + tablePrefix + "category_tag` (\n" +
" `oId` varchar(19) NOT NULL,\n" +
" `category_oId` varchar(19) NOT NULL,\n" +
" `tag_oId` varchar(19) NOT NULL,\n" +
" PRIMARY KEY (`oId`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
statement.close();
connection.commit();
connection.close();
}
/**
* Upgrades users.
* <p>
......
......@@ -5,6 +5,16 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h2>Release 2.1.0 - May 25, 2017</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12284">12284 H2 SQL 文件导出</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
<li><a href="https://github.com/b3log/solo/issues/12280">12280 社区同步过来的评论加入头像</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12285">12285 移除 HTML 编辑器</a>&nbsp;<span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12273">12273 重新整理文档</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12278">12278 新的 Logo</a>&nbsp;<span style='background: #006b75 !important;color:#FFFFFF !important;padding: 1px 4px;'>doc</span></li>
<li><a href="https://github.com/b3log/solo/issues/12274">12274 更新分类标签计数错误</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12295">12295 并发请求报错</a>&nbsp;<span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
</ul>
<h2>Release 2.0.0 - Apr 14, 2017</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12256">12256 支持文章分类</a>&nbsp;<span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment