mirror of https://github.com/halo-dev/halo
feat: update migrate sql script.
parent
f1dbeef81a
commit
0d622d35d1
|
@ -2,8 +2,6 @@
|
|||
|
||||
> Halo 是一款现代化的个人独立博客系统,给习惯写博客的同学多一个选择。
|
||||
|
||||
|
||||
|
||||
<p align="center">
|
||||
<a href="#"><img alt="JDK" src="https://img.shields.io/badge/JDK-1.8-yellow.svg?style=flat-square"/></a>
|
||||
<a href="https://github.com/halo-dev/halo/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/halo-dev/halo.svg?style=flat-square"/></a>
|
||||
|
@ -23,6 +21,10 @@
|
|||
|
||||
> [官网](https://halo.run) | [社区](https://bbs.halo.run) | [QQ 交流群](https://jq.qq.com/?_wv=1027&k=5tnr930) | [Telegram 交流群](https://t.me/HaloBlog) | [Telegram 频道](https://t.me/halo_dev)
|
||||
|
||||
## 声明
|
||||
|
||||
> 本项目旨在创造一个好的产品以供人们使用(虽然现在并不是太好),并非一个所谓提供学习的项目。所以,不提供任何学习代码的帮助。所以,请不要在讨论群,issues,论坛发起任何有关代码学习的问题。当然,如果你是要参与代码贡献,我们非常欢迎。
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 下载最新的 Halo 安装包
|
||||
|
|
|
@ -51,6 +51,12 @@ public class LinkController {
|
|||
return new LinkDTO().convertFrom(linkService.getById(id));
|
||||
}
|
||||
|
||||
@GetMapping("parse")
|
||||
@ApiOperation("Get link by parse url")
|
||||
public LinkDTO getByParse(@RequestParam("url") String url) {
|
||||
return linkService.getByParse(url);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public LinkDTO createBy(@RequestBody @Valid LinkParam linkParam) {
|
||||
Link link = linkService.createBy(linkParam);
|
||||
|
|
|
@ -19,6 +19,12 @@ import java.util.List;
|
|||
*/
|
||||
public interface LinkService extends CrudService<Link, Integer> {
|
||||
|
||||
String META_NAME = "name";
|
||||
|
||||
String META_DESCRIPTION = "description";
|
||||
|
||||
String META_CONTENT = "content";
|
||||
|
||||
/**
|
||||
* List link dtos.
|
||||
*
|
||||
|
@ -60,4 +66,12 @@ public interface LinkService extends CrudService<Link, Integer> {
|
|||
* @return a list of teams.
|
||||
*/
|
||||
List<String> listAllTeams();
|
||||
|
||||
/**
|
||||
* Get link by parse url.
|
||||
*
|
||||
* @param url url must not be null
|
||||
* @return link dto
|
||||
*/
|
||||
LinkDTO getByParse(@NonNull String url);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package run.halo.app.service.impl;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.select.Elements;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
@ -8,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import run.halo.app.exception.AlreadyExistsException;
|
||||
import run.halo.app.exception.BadRequestException;
|
||||
import run.halo.app.model.dto.LinkDTO;
|
||||
import run.halo.app.model.entity.Link;
|
||||
import run.halo.app.model.params.LinkParam;
|
||||
|
@ -17,6 +21,7 @@ import run.halo.app.service.LinkService;
|
|||
import run.halo.app.service.base.AbstractCrudService;
|
||||
import run.halo.app.utils.ServiceUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -100,6 +105,30 @@ public class LinkServiceImpl extends AbstractCrudService<Link, Integer> implemen
|
|||
return linkRepository.findAllTeams();
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkDTO getByParse(String url) {
|
||||
Assert.hasText(url, "Url must not be blank");
|
||||
LinkDTO linkDTO = new LinkDTO();
|
||||
linkDTO.setUrl(url);
|
||||
try {
|
||||
Document document = Jsoup.connect(url).get();
|
||||
|
||||
// Get html title.
|
||||
linkDTO.setName(document.title());
|
||||
|
||||
// Get html metas.
|
||||
Elements metas = document.head().select("meta");
|
||||
metas.forEach(element -> {
|
||||
if (META_DESCRIPTION.equalsIgnoreCase(element.attr(META_NAME))) {
|
||||
linkDTO.setDescription(element.attr(META_CONTENT));
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
throw new BadRequestException("获取网站信息失败").setErrorData(e);
|
||||
}
|
||||
return linkDTO;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private List<LinkDTO> convertTo(@Nullable List<Link> links) {
|
||||
if (CollectionUtils.isEmpty(links)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
.profile-center-avatarHolder[data-v-5c7d1000]{text-align:center;margin-bottom:24px}.profile-center-avatarHolder>.avatar[data-v-5c7d1000]{margin:0 auto;width:104px;height:104px;margin-bottom:20px;border-radius:50%;overflow:hidden;cursor:pointer}.profile-center-avatarHolder>.avatar img[data-v-5c7d1000]{height:100%;width:100%}.profile-center-avatarHolder .username[data-v-5c7d1000]{color:rgba(0,0,0,.85);font-size:20px;line-height:28px;font-weight:500;margin-bottom:4px}.profile-center-detail p[data-v-5c7d1000]{margin-bottom:8px;padding-left:26px;position:relative}.profile-center-detail i[data-v-5c7d1000]{position:absolute;height:14px;width:14px;left:0;top:4px}
|
|
@ -0,0 +1 @@
|
|||
.profile-center-avatarHolder[data-v-5b5b3393]{text-align:center;margin-bottom:24px}.profile-center-avatarHolder>.avatar[data-v-5b5b3393]{margin:0 auto;width:104px;height:104px;margin-bottom:20px;border-radius:50%;overflow:hidden;cursor:pointer}.profile-center-avatarHolder>.avatar img[data-v-5b5b3393]{height:100%;width:100%}.profile-center-avatarHolder .username[data-v-5b5b3393]{color:rgba(0,0,0,.85);font-size:20px;line-height:28px;font-weight:500;margin-bottom:4px}.profile-center-detail p[data-v-5b5b3393]{margin-bottom:8px;padding-left:26px;position:relative}.profile-center-detail i[data-v-5b5b3393]{position:absolute;height:14px;width:14px;left:0;top:4px}
|
|
@ -1 +0,0 @@
|
|||
@font-face{font-family:fontello;src:url(../fonts/fontello.e73a0647.eot);src:url(../fonts/fontello.e73a0647.eot#iefix) format("embedded-opentype"),url(../fonts/fontello.8d4a4e6f.woff2) format("woff2"),url(../fonts/fontello.a782baa8.woff) format("woff"),url(../fonts/fontello.068ca2b3.ttf) format("truetype"),url(../assets/fontello.9354499c.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" fa-halo-"]:before,[class^=fa-halo-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-halo-bold:before{content:"\E800"}.fa-halo-italic:before{content:"\E801"}.fa-halo-thumb-tack:before{content:"\E802"}.fa-halo-link:before{content:"\E803"}.fa-halo-picture-o:before{content:"\E804"}.fa-halo-repeat:before{content:"\E805"}.fa-halo-undo:before{content:"\E806"}.fa-halo-trash-o:before{content:"\E807"}.fa-halo-floppy-o:before{content:"\E808"}.fa-halo-compress:before{content:"\E809"}.fa-halo-eye:before{content:"\E80A"}.fa-halo-eye-slash:before{content:"\E80B"}.fa-halo-question-circle:before{content:"\E80C"}.fa-halo-times:before{content:"\E80D"}.fa-halo-align-left:before{content:"\E80F"}.fa-halo-align-center:before{content:"\E810"}.fa-halo-align-right:before{content:"\E811"}.fa-halo-arrows-alt:before{content:"\F0B2"}.fa-halo-bars:before{content:"\F0C9"}.fa-halo-list-ul:before{content:"\F0CA"}.fa-halo-list-ol:before{content:"\F0CB"}.fa-halo-strikethrough:before{content:"\F0CC"}.fa-halo-underline:before{content:"\F0CD"}.fa-halo-table:before{content:"\F0CE"}.fa-halo-columns:before{content:"\F0DB"}.fa-halo-quote-left:before{content:"\F10D"}.fa-halo-code:before{content:"\F121"}.fa-halo-superscript:before{content:"\F12B"}.fa-halo-subscript:before{content:"\F12C"}.fa-halo-header:before{content:"\F1DC"}.fa-halo-window-maximize:before{content:"\F2D0"}.markdown-body strong{font-weight:bolder}.markdown-body .hljs-center{text-align:center}.markdown-body .hljs-right{text-align:right}.markdown-body .hljs-left{text-align:left}
|
|
@ -0,0 +1 @@
|
|||
@font-face{font-family:fontello;src:url(../fonts/fontello.e73a0647.eot);src:url(../fonts/fontello.e73a0647.eot#iefix) format("embedded-opentype"),url(../fonts/fontello.8d4a4e6f.woff2) format("woff2"),url(../fonts/fontello.a782baa8.woff) format("woff"),url(../fonts/fontello.068ca2b3.ttf) format("truetype"),url(../assets/fontello.9354499c.svg#fontello) format("svg");font-weight:400;font-style:normal}[class*=" fa-halo-"]:before,[class^=fa-halo-]:before{font-family:fontello;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-halo-bold:before{content:"\E800"}.fa-halo-italic:before{content:"\E801"}.fa-halo-link:before{content:"\E803"}.fa-halo-picture-o:before{content:"\E804"}.fa-halo-repeat:before{content:"\E805"}.fa-halo-undo:before{content:"\E806"}.fa-halo-trash-o:before{content:"\E807"}.fa-halo-floppy-o:before{content:"\E808"}.fa-halo-compress:before{content:"\E809"}.fa-halo-eye:before{content:"\E80A"}.fa-halo-eye-slash:before{content:"\E80B"}.fa-halo-question-circle:before{content:"\E80C"}.fa-halo-times:before{content:"\E80D"}.fa-halo-arrows-alt:before{content:"\F0B2"}.fa-halo-bars:before{content:"\F0C9"}.fa-halo-list-ul:before{content:"\F0CA"}.fa-halo-list-ol:before{content:"\F0CB"}.fa-halo-strikethrough:before{content:"\F0CC"}.fa-halo-underline:before{content:"\F0CD"}.fa-halo-table:before{content:"\F0CE"}.fa-halo-columns:before{content:"\F0DB"}.fa-halo-quote-left:before{content:"\F10D"}.fa-halo-code:before{content:"\F121"}.fa-halo-superscript:before{content:"\F12B"}.fa-halo-subscript:before{content:"\F12C"}.fa-halo-header:before{content:"\F1DC"}.fa-halo-window-maximize:before{content:"\F2D0"}.markdown-body strong{font-weight:bolder}
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content="Halo "><link rel=icon href=/logo.png><title>Halo Dashboard</title><style>#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}</style><link href=/css/chunk-0b44f908.c76aeee1.css rel=prefetch><link href=/css/chunk-0e87dfa3.0e33e21a.css rel=prefetch><link href=/css/chunk-726b68a8.8c5e3874.css rel=prefetch><link href=/css/chunk-7b4a6534.0e33e21a.css rel=prefetch><link href=/css/chunk-7e9c61cd.e32891ce.css rel=prefetch><link href=/css/chunk-966610cc.be194fd2.css rel=prefetch><link href=/css/chunk-db4f48dc.84211a72.css rel=prefetch><link href=/js/chunk-0b44f908.7d0bf7f7.js rel=prefetch><link href=/js/chunk-0ba750a2.5e42e97d.js rel=prefetch><link href=/js/chunk-0e87dfa3.35586d8c.js rel=prefetch><link href=/js/chunk-17f8cd22.6f17c85f.js rel=prefetch><link href=/js/chunk-1f7f5e53.d2948600.js rel=prefetch><link href=/js/chunk-27659703.10f931a5.js rel=prefetch><link href=/js/chunk-2d0b383e.58d8ef45.js rel=prefetch><link href=/js/chunk-2d0b64bf.61254a9c.js rel=prefetch><link href=/js/chunk-2d0b8b03.12a7aa54.js rel=prefetch><link href=/js/chunk-2d0cf13d.a918b925.js rel=prefetch><link href=/js/chunk-2d21a35c.504f84f8.js rel=prefetch><link href=/js/chunk-2d221c57.b7fb07c5.js rel=prefetch><link href=/js/chunk-2d228c74.ccd59772.js rel=prefetch><link href=/js/chunk-2d228d13.23373a17.js rel=prefetch><link href=/js/chunk-37a26d88.2d546151.js rel=prefetch><link href=/js/chunk-5889a1fc.80bc8fa1.js rel=prefetch><link href=/js/chunk-664d53d7.7aab90ce.js rel=prefetch><link href=/js/chunk-6709ac89.ba093961.js rel=prefetch><link href=/js/chunk-70b41592.efb0664d.js rel=prefetch><link href=/js/chunk-726b68a8.5e19ff75.js rel=prefetch><link href=/js/chunk-7b4a6534.3d99debe.js rel=prefetch><link href=/js/chunk-7e9c61cd.5b0ff137.js rel=prefetch><link href=/js/chunk-966610cc.d7b9d9d4.js rel=prefetch><link href=/js/chunk-98555926.df29a2aa.js rel=prefetch><link href=/js/chunk-d4605eca.914db946.js rel=prefetch><link href=/js/chunk-db4f48dc.e9bac69c.js rel=prefetch><link href=/js/chunk-ddaf34b4.7c13b234.js rel=prefetch><link href=/js/chunk-f04cc1dc.2e475fcd.js rel=prefetch><link href=/css/app.308f4610.css rel=preload as=style><link href=/css/chunk-vendors.efd5cbc2.css rel=preload as=style><link href=/js/app.eff20162.js rel=preload as=script><link href=/js/chunk-vendors.d4c27346.js rel=preload as=script><link href=/css/chunk-vendors.efd5cbc2.css rel=stylesheet><link href=/css/app.308f4610.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app><div id=loader></div></div><script src=/js/chunk-vendors.d4c27346.js></script><script src=/js/app.eff20162.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=zh-cmn-Hans><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name=robots content=noindex,nofllow><meta name=generator content="Halo "><link rel=icon href=/logo.png><title>Halo Dashboard</title><style>#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}</style><link href=/css/chunk-0b44f908.c76aeee1.css rel=prefetch><link href=/css/chunk-0e87dfa3.0e33e21a.css rel=prefetch><link href=/css/chunk-7b4a6534.0e33e21a.css rel=prefetch><link href=/css/chunk-7e9c61cd.e32891ce.css rel=prefetch><link href=/css/chunk-8adae550.ae3f2f3c.css rel=prefetch><link href=/css/chunk-966610cc.be194fd2.css rel=prefetch><link href=/css/chunk-db4f48dc.e76ee991.css rel=prefetch><link href=/js/chunk-0b44f908.26d3343e.js rel=prefetch><link href=/js/chunk-0ba750a2.252e8b2e.js rel=prefetch><link href=/js/chunk-0e87dfa3.90c3ffc2.js rel=prefetch><link href=/js/chunk-17f8cd22.41a81c70.js rel=prefetch><link href=/js/chunk-27659703.89139ba4.js rel=prefetch><link href=/js/chunk-2d0b383e.5e7741ec.js rel=prefetch><link href=/js/chunk-2d0b64bf.2af8f14d.js rel=prefetch><link href=/js/chunk-2d0b8b03.93944029.js rel=prefetch><link href=/js/chunk-2d0cf13d.125517f6.js rel=prefetch><link href=/js/chunk-2d21a35c.081403fa.js rel=prefetch><link href=/js/chunk-2d221c57.2aa2ba62.js rel=prefetch><link href=/js/chunk-2d228c74.8a268b9e.js rel=prefetch><link href=/js/chunk-2d228d13.106628a6.js rel=prefetch><link href=/js/chunk-37a26d88.6c52f6db.js rel=prefetch><link href=/js/chunk-5889a1fc.4fc73f61.js rel=prefetch><link href=/js/chunk-5b9394ac.e9489ce3.js rel=prefetch><link href=/js/chunk-664d53d7.0064a589.js rel=prefetch><link href=/js/chunk-6709ac89.9e8a3853.js rel=prefetch><link href=/js/chunk-76ee4b7f.21c99ffd.js rel=prefetch><link href=/js/chunk-7b4a6534.d4289bc1.js rel=prefetch><link href=/js/chunk-7e9c61cd.4007e9d8.js rel=prefetch><link href=/js/chunk-8adae550.055be237.js rel=prefetch><link href=/js/chunk-966610cc.8aad8ed5.js rel=prefetch><link href=/js/chunk-98555926.7145ac47.js rel=prefetch><link href=/js/chunk-db4f48dc.d71f645a.js rel=prefetch><link href=/js/chunk-ddaf34b4.b2c17516.js rel=prefetch><link href=/js/chunk-ec5bbb3c.c0674795.js rel=prefetch><link href=/js/chunk-f04cc1dc.4a8c53e2.js rel=prefetch><link href=/css/app.01b9c5fe.css rel=preload as=style><link href=/css/chunk-vendors.473c34a0.css rel=preload as=style><link href=/js/app.7db0b7f3.js rel=preload as=script><link href=/js/chunk-vendors.865f02b9.js rel=preload as=script><link href=/css/chunk-vendors.473c34a0.css rel=stylesheet><link href=/css/app.01b9c5fe.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app><div id=loader></div></div><script src=/js/chunk-vendors.865f02b9.js></script><script src=/js/app.7db0b7f3.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,28 +0,0 @@
|
|||
-- Migrate * to 1.1.3
|
||||
|
||||
-- Migrate options Table
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_domain_protocol' WHERE OPTION_KEY = 'oss_aliyun_domain_protocol';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_domain' WHERE OPTION_KEY = 'oss_aliyun_domain';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_endpoint' WHERE OPTION_KEY = 'oss_aliyun_endpoint';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_bucket_name' WHERE OPTION_KEY = 'oss_aliyun_bucket_name';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_access_key' WHERE OPTION_KEY = 'oss_aliyun_access_key';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_access_secret' WHERE OPTION_KEY = 'oss_aliyun_access_secret';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_style_rule' WHERE OPTION_KEY = 'oss_aliyun_style_rule';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'oss_ali_thumbnail_style_rule' WHERE OPTION_KEY = 'oss_aliyun_thumbnail_style_rule';
|
||||
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_domain_protocol' WHERE OPTION_KEY = 'bos_baiduyun_domain_protocol';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_domain' WHERE OPTION_KEY = 'bos_baiduyun_domain';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_endpoint' WHERE OPTION_KEY = 'bos_baiduyun_endpoint';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_bucket_name' WHERE OPTION_KEY = 'bos_baiduyun_bucket_name';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_access_key' WHERE OPTION_KEY = 'bos_baiduyun_access_key';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_secret_key' WHERE OPTION_KEY = 'bos_baiduyun_secret_key';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_style_rule' WHERE OPTION_KEY = 'bos_baiduyun_style_rule';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'bos_baidu_thumbnail_style_rule' WHERE OPTION_KEY = 'bos_baiduyun_thumbnail_style_rule';
|
||||
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_domain_protocol' WHERE OPTION_KEY = 'cos_tencentyun_domain_protocol';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_domain' WHERE OPTION_KEY = 'cos_tencentyun_domain';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_region' WHERE OPTION_KEY = 'cos_tencentyun_region';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_bucket_name' WHERE OPTION_KEY = 'cos_tencentyun_bucket_name';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_secret_id' WHERE OPTION_KEY = 'cos_tencentyun_secret_id';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_secret_key' WHERE OPTION_KEY = 'cos_tencentyun_secret_key';
|
||||
UPDATE OPTIONS SET OPTION_KEY = 'cos_tencent_thumbnail_style_rule' WHERE OPTION_KEY = 'cos_tencentyun_thumbnail_style_rule';
|
|
@ -0,0 +1,35 @@
|
|||
-- Migrate * to 1.1.3
|
||||
|
||||
-- Migrate options Table
|
||||
update options set option_key = 'oss_ali_domain_protocol' where option_key = 'oss_aliyun_domain_protocol';
|
||||
update options set option_key = 'oss_ali_domain' where option_key = 'oss_aliyun_domain';
|
||||
update options set option_key = 'oss_ali_endpoint' where option_key = 'oss_aliyun_endpoint';
|
||||
update options set option_key = 'oss_ali_bucket_name' where option_key = 'oss_aliyun_bucket_name';
|
||||
update options set option_key = 'oss_ali_access_key' where option_key = 'oss_aliyun_access_key';
|
||||
update options set option_key = 'oss_ali_access_secret' where option_key = 'oss_aliyun_access_secret';
|
||||
update options set option_key = 'oss_ali_style_rule' where option_key = 'oss_aliyun_style_rule';
|
||||
update options set option_key = 'oss_ali_thumbnail_style_rule' where option_key = 'oss_aliyun_thumbnail_style_rule';
|
||||
|
||||
update options set option_key = 'bos_baidu_domain_protocol' where option_key = 'bos_baiduyun_domain_protocol';
|
||||
update options set option_key = 'bos_baidu_domain' where option_key = 'bos_baiduyun_domain';
|
||||
update options set option_key = 'bos_baidu_endpoint' where option_key = 'bos_baiduyun_endpoint';
|
||||
update options set option_key = 'bos_baidu_bucket_name' where option_key = 'bos_baiduyun_bucket_name';
|
||||
update options set option_key = 'bos_baidu_access_key' where option_key = 'bos_baiduyun_access_key';
|
||||
update options set option_key = 'bos_baidu_secret_key' where option_key = 'bos_baiduyun_secret_key';
|
||||
update options set option_key = 'bos_baidu_style_rule' where option_key = 'bos_baiduyun_style_rule';
|
||||
update options set option_key = 'bos_baidu_thumbnail_style_rule' where option_key = 'bos_baiduyun_thumbnail_style_rule';
|
||||
|
||||
update options set option_key = 'cos_tencent_domain_protocol' where option_key = 'cos_tencentyun_domain_protocol';
|
||||
update options set option_key = 'cos_tencent_domain' where option_key = 'cos_tencentyun_domain';
|
||||
update options set option_key = 'cos_tencent_region' where option_key = 'cos_tencentyun_region';
|
||||
update options set option_key = 'cos_tencent_bucket_name' where option_key = 'cos_tencentyun_bucket_name';
|
||||
update options set option_key = 'cos_tencent_secret_id' where option_key = 'cos_tencentyun_secret_id';
|
||||
update options set option_key = 'cos_tencent_secret_key' where option_key = 'cos_tencentyun_secret_key';
|
||||
update options set option_key = 'cos_tencent_thumbnail_style_rule' where option_key = 'cos_tencentyun_thumbnail_style_rule';
|
||||
|
||||
-- Migrate attachments Table
|
||||
alter table attachments modify media_type varchar (127) not null;
|
||||
|
||||
-- Migrate posts Table
|
||||
alter table posts modify `original_content` longtext not null;
|
||||
alter table posts modify `format_content` longtext not null;
|
Loading…
Reference in New Issue