baiyangtx commented on code in PR #3144:
URL: https://github.com/apache/amoro/pull/3144#discussion_r1737666676
##########
amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/AmoroManagementConf.java:
##########
@@ -260,6 +260,12 @@ public class AmoroManagementConf {
.defaultValue("jdbc:derby:/tmp/amoro/derby;create=true")
.withDescription("Database connection address");
+ public static final ConfigOption<Boolean> DB_INIT_SCHEMA =
+ ConfigOptions.key("database.init-schema")
Review Comment:
fixed
##########
amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/persistence/SqlSessionFactoryProvider.java:
##########
@@ -123,6 +126,11 @@ public void init(Configurations config) {
* @param config
*/
private void createTablesIfNeed(Configurations config) {
+ boolean initSchema = config.getBoolean(AmoroManagementConf.DB_INIT_SCHEMA);
+ if (!initSchema) {
+ LOG.info("Skip database schema initialize.");
Review Comment:
fixed
##########
docs/admin-guides/deployment.md:
##########
@@ -129,10 +129,13 @@ ams:
# type: postgres
# jdbc-driver-class: org.postgresql.Driver
# url: jdbc:postgresql://127.0.0.1:5432/amoro
+# init-schema: false
# username: user
# password: passwd
```
+AMS will create tables automatically, if you want to create tables on
yourself, set `ams.database.init-schema` to false.
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]