Skip to content

Commit

Permalink
rebuild40
Browse files Browse the repository at this point in the history
  • Loading branch information
getrebuild committed Dec 28, 2024
1 parent 1eba849 commit 31b58e5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ git:
submodules: false

before_script:
- mysql -e "CREATE DATABASE rebuild30 COLLATE utf8mb4_general_ci;"
- mysql -e "CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; GRANT ALL PRIVILEGES ON rebuild30.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES;"
- mysql -D rebuild30 < src/main/resources/scripts/db-init.sql
- mysql -e "CREATE DATABASE rebuild40 COLLATE utf8mb4_general_ci;"
- mysql -e "CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; GRANT ALL PRIVILEGES ON rebuild40.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES;"
- mysql -D rebuild40 < src/main/resources/scripts/db-init.sql

# codecov
after_success:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void postProcessEnvironment(ConfigurableEnvironment env, SpringApplicatio

// `application-bean.xml` 占位符必填
if (dbUrl == null) {
dbUrl = "jdbc:mysql://127.0.0.1:3306/rebuild30?characterEncoding=UTF8";
dbUrl = "jdbc:mysql://127.0.0.1:3306/rebuild40?characterEncoding=UTF8";
confPs.put("db.url", dbUrl);
}
if (env.getProperty("db.user") == null) confPs.put("db.user", "rebuild");
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# !!! `db.*` ONLY FOR DEV MODE !!!
db.url: jdbc:mysql://127.0.0.1:3306/rebuild30?characterEncoding=UTF8&useUnicode=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B08:00
db.url: jdbc:mysql://127.0.0.1:4653/rebuild40?characterEncoding=UTF8&useUnicode=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B08:00
db.user: rebuild
db.passwd: rebuild
# Use built-in ehcache if redis not defined or unavailable
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/scripts/db-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
-- #1 database/user
-- 首次使用请移除以下注释以创建数据库和用户
/*
CREATE DATABASE rebuild30 COLLATE utf8mb4_general_ci;
CREATE DATABASE rebuild40 COLLATE utf8mb4_general_ci;
CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild';
GRANT ALL PRIVILEGES ON rebuild30.* TO 'rebuild'@'127.0.0.1';
GRANT ALL PRIVILEGES ON rebuild40.* TO 'rebuild'@'127.0.0.1';
GRANT RELOAD ON *.* TO 'rebuild'@'127.0.0.1';
FLUSH PRIVILEGES;
USE rebuild30;
USE rebuild40;
*/

-- #2 schemas
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/web/assets/js/admin/setup-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class DatabaseConf extends React.Component {
<div className="form-group row">
<div className="col-sm-3 col-form-label text-sm-right">{$L('数据库名称')}</div>
<div className="col-sm-7">
<input type="text" className="form-control form-control-sm" name="dbName" value={this.state.dbName || ''} onChange={this.handleValue} placeholder="rebuild30" />
<input type="text" className="form-control form-control-sm" name="dbName" value={this.state.dbName || ''} onChange={this.handleValue} placeholder="rebuild40" />
<div className="form-text">{$L('如数据库不存在系统将自动创建')}</div>
</div>
</div>
Expand Down Expand Up @@ -260,7 +260,7 @@ class DatabaseConf extends React.Component {
dbType: 'mysql',
dbHost: this.state.dbHost || '127.0.0.1',
dbPort: this.state.dbPort || 3306,
dbName: this.state.dbName || 'rebuild30',
dbName: this.state.dbName || 'rebuild40',
dbUser: this.state.dbUser || 'rebuild',
dbPassword: this.state.dbPassword || 'rebuild',
}
Expand Down

0 comments on commit 31b58e5

Please sign in to comment.