/
PrimeConfig.java
125 lines (108 loc) · 2.79 KB
/
PrimeConfig.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package org.technologybrewery.prime;
import java.util.List;
import org.aeonbits.owner.KrauseningConfig;
import org.aeonbits.owner.KrauseningConfig.KrauseningSources;
/**
* Configuration values for Prime.
*/
@KrauseningSources("prime.properties")
public interface PrimeConfig extends KrauseningConfig {
/**
* Whether or not prime is active.
*
* @return active or not
*/
@Key("active")
@DefaultValue("true")
Boolean isActive();
/**
* Whether to have Flyway baseline on migration if it has not already been done.
*
* @return baseline or not
*/
@Key("baseline.on.migrate")
@DefaultValue("true")
Boolean shouldBaselineOnMigrate();
/**
* The baseline version to use, if baselining.
*
* @return version
*/
@Key("baseline.version")
@DefaultValue("0.0.0")
String getBaselineVersion();
/**
* How long to wait before retrying the database on failure.
*
* @return retry delay in milliseconds
*/
@Key("migration.retry.wait.time")
@DefaultValue("20000")
Integer getMigrationRetryWaitTime();
/**
* The database schema to use.
*
* @return schema
*/
@Key("schema")
String getSchema();
/**
* The JDBC url to use.
*
* @return JDBC url
*/
@Key("url")
String getUrl();
/**
* Database username.
*
* @return username
*/
@Key("username")
String getUsername();
/**
* Database password.
*
* @return password
*/
@Key("password")
String getPassword();
/**
* A comma separated list of Flyway-style migration locations. For more information, please see the following url:
* https://flywaydb.org/documentation/commandline/migrate#locations
*
* @return migration locations
*/
@Key("migration.locations")
@DefaultValue("classpath:migrations/common")
List<String> getMigrationLocations();
/**
* A folder location of where to find migrations that are specific to the current database type.
* @return migration location
*/
@Key("migration.locations.database-type")
@DefaultValue("classpath:migrations/mssql")
String getMigrationLocationDatabaseType();
/**
* Prefix for replacing strings within SQL scripts.
*
* @return prefix
*/
@Key("placeholder.prefix")
@DefaultValue("^{")
String getPlaceholderPrefix();
/**
* Suffix for replacing strings within SQL scripts.
*
* @return suffix
*/
@Key("placeholder.suffix")
@DefaultValue("}")
String getPlaceholderSuffix();
/**
* When set, will customize the table in which Flyway stores history information.
* @return name of the custom schema
*/
@Key("schema.table")
String getTable();
}