1 |
|
package liquibase.change.core; |
2 |
|
|
3 |
|
import liquibase.change.AbstractChange; |
4 |
|
import liquibase.change.ChangeMetaData; |
5 |
|
import liquibase.database.Database; |
6 |
|
import liquibase.statement.SqlStatement; |
7 |
|
import liquibase.statement.core.DropSequenceStatement; |
8 |
|
import liquibase.util.StringUtils; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
|
|
| 81.2% |
Uncovered Elements: 3 (16) |
Complexity: 8 |
Complexity Density: 1.14 |
|
13 |
|
public class DropSequenceChange extends AbstractChange { |
14 |
|
|
15 |
|
private String schemaName; |
16 |
|
private String sequenceName; |
17 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
18 |
21
|
public DropSequenceChange() {... |
19 |
21
|
super("dropSequence", "Drop Sequence", ChangeMetaData.PRIORITY_DEFAULT); |
20 |
|
} |
21 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
22 |
39
|
public String getSchemaName() {... |
23 |
39
|
return schemaName; |
24 |
|
} |
25 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
26 |
0
|
public void setSchemaName(String schemaName) {... |
27 |
0
|
this.schemaName = StringUtils.trimToNull(schemaName); |
28 |
|
} |
29 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
30 |
40
|
public String getSequenceName() {... |
31 |
40
|
return sequenceName; |
32 |
|
} |
33 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
34 |
7
|
public void setSequenceName(String sequenceName) {... |
35 |
7
|
this.sequenceName = sequenceName; |
36 |
|
} |
37 |
|
|
|
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
38 |
39
|
public SqlStatement[] generateStatements(Database database) {... |
39 |
39
|
return new SqlStatement[] { new DropSequenceStatement(getSchemaName() == null ? database.getDefaultSchemaName() |
40 |
|
: getSchemaName(), getSequenceName()) }; |
41 |
|
} |
42 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
43 |
1
|
public String getConfirmationMessage() {... |
44 |
1
|
return "Sequence " + getSequenceName() + " dropped"; |
45 |
|
} |
46 |
|
} |