Comments (11)
应该是不需要的,可以试一下把所有的DataChange_CreatedTime
字段上的DEFAULT CURRENT_TIMESTAMP COMMENT改为DEFAULT '2000-01-01 00:00:00'。
从代码上看,创建时间都会被程序设置的。
@PrePersist
protected void prePersist() {
if (this.dataChangeCreatedTime == null) dataChangeCreatedTime = new Date();
if (this.dataChangeLastModifiedTime == null) dataChangeLastModifiedTime = new Date();
}
from apollo.
可行,附上我的更改脚本。
cd ~/apollo-build-scripts/sql
perl -pi -e 's/\`DataChange_CreatedTime\` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP/\`DataChange_CreatedTime\` timestamp NOT NULL DEFAULT \'2000-01-01 00:00:00\'/g' *
from apollo.
目前来看,主要是用到了两个高级特性:
- utf8mb4 - 这个需要5.5版本以上
- 一张表有多个timestamp的default值 - 这个需要5.6.5以上
所以,理论上而言,使用5.5.40也是可以的,修改一下建表语句就可以了。
把一张表中多个timestamp的default值去掉一个就可以了,代码里面应该都会设置默认值的。
from apollo.
utf8mb4这个没问题,timestamp 这个问题我,确认下,需要代码patch么
from apollo.
我实验下
from apollo.
5.5 还存在 fulltext key 不支持 innodb 的问题,需要改为key
from apollo.
@secwang PR143把fulltext key改为key了。
from apollo.
哈哈,感谢
from apollo.
@nobodyiam
DEFAULT CURRENT_TIMESTAMP 改成 DEFAULT '2000-01-01 00:00:00' 吧?
我看你的有COMMENT。
from apollo.
@lyg123 comment无所谓的
from apollo.
我刚刚升级了
from apollo.
Related Issues (20)
- Add more observability in apollo config client HOT 2
- 请教 Bash 脚本如何请求开启了访问密钥的配置项 HOT 6
- apollo.meta; nested exception is java.net.UnknownHostException: apollo.meta HOT 5
- When is the 2.3.0 release scheduled? HOT 2
- Portal 模块 RestTemplate 支持配置 ConnectionTimeToLive
- apollo2.1.0集成pgsql,求给一份pgsql的sql文件。mysql的不可以用 HOT 4
- 无法删除旧的配置 HOT 6
- 在项目namespace数量比较多的情况下(大约1000个),打开页面加载速度很慢,比较影响用户体验,这个是否有什么优化改进方案? HOT 7
- Apollo是否可以支持按照key维度来发布? HOT 2
- 1.8.0,接入一个app.id 使用多个namespace的时候,多个namesapce均开启了accesskey.sercet,这时候接入的配置代码要怎么写呢 HOT 3
- OidcLocalUserService throw an Exception when executing createLocalUser in OIDC profile HOT 6
- 麻烦问下,有什么办法能同时读到多个环境同一个配置的值吗? HOT 3
- 使用客户端添加string类型的配置项时会报错 HOT 1
- 配置从 2.1.0导出,导入到 2.2.0,数据中时间解析失败 HOT 1
- 在 apollo-portal统一增加访问路径的前缀/apollo 时,导入配置的请求url 有部分没有添加前缀 HOT 1
- apollo-portal 使用统一前缀/apollo以后,创建集群失败 HOT 1
- k8s部署apollo 接入ldap报错 HOT 1
- 请问有大佬已经在2.2.0版本上,数据源由mysql切换至pg了嘛? HOT 1
- 脚本启动与停止的问题 HOT 3
- 删除App后,相似的AppID权限异常,并无法恢复 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo.