1 |
|
package org.liquibase.maven.plugins; |
2 |
|
|
3 |
|
import liquibase.exception.LiquibaseException; |
4 |
|
import liquibase.Liquibase; |
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
@author |
10 |
|
|
11 |
|
|
12 |
|
|
|
|
| 0% |
Uncovered Elements: 13 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
13 |
|
public class LiquibaseUpdate extends AbstractLiquibaseUpdateMojo { |
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
protected boolean dropFirst; |
21 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
22 |
0
|
@Override... |
23 |
|
protected void doUpdate(Liquibase liquibase) throws LiquibaseException { |
24 |
0
|
if (dropFirst) { |
25 |
0
|
liquibase.dropAll(); |
26 |
|
} |
27 |
|
|
28 |
0
|
if (changesToApply > 0) { |
29 |
0
|
liquibase.update(changesToApply, contexts); |
30 |
|
} else { |
31 |
0
|
liquibase.update(contexts); |
32 |
|
} |
33 |
|
} |
34 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
35 |
0
|
@Override... |
36 |
|
protected void printSettings(String indent) { |
37 |
0
|
super.printSettings(indent); |
38 |
0
|
getLog().info(indent + "drop first? " + dropFirst); |
39 |
|
|
40 |
|
} |
41 |
|
} |