1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package com.xpn.xwiki.store.migration.hibernate; |
22 |
|
|
23 |
|
import javax.inject.Named; |
24 |
|
import javax.inject.Singleton; |
25 |
|
|
26 |
|
import org.xwiki.component.annotation.Component; |
27 |
|
|
28 |
|
import com.xpn.xwiki.XWikiException; |
29 |
|
import com.xpn.xwiki.store.migration.DataMigrationException; |
30 |
|
import com.xpn.xwiki.store.migration.XWikiDBVersion; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@version |
36 |
|
@since |
37 |
|
|
38 |
|
@Component |
39 |
|
@Named("R43000XWIKI6691") |
40 |
|
@Singleton |
|
|
| 22.2% |
Uncovered Elements: 7 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
41 |
|
public class R43000XWIKI6691DataMigration extends AbstractHibernateDataMigration |
42 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
43 |
0 |
@Override... |
44 |
|
public String getDescription() |
45 |
|
{ |
46 |
0 |
return "Reduce the size of the ASE_REQUESTID column to 48-chars"; |
47 |
|
} |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
206 |
@Override... |
50 |
|
public XWikiDBVersion getVersion() |
51 |
|
{ |
52 |
206 |
return new XWikiDBVersion(43000); |
53 |
|
} |
54 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
55 |
0 |
@Override... |
56 |
|
public void hibernateMigrate() throws DataMigrationException, XWikiException |
57 |
|
{ |
58 |
|
|
59 |
|
} |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
61 |
0 |
@Override... |
62 |
|
public String getPreHibernateLiquibaseChangeLog() throws DataMigrationException |
63 |
|
{ |
64 |
0 |
StringBuilder result = new StringBuilder(); |
65 |
0 |
result.append(" <changeSet id=\"R").append(this.getVersion().getVersion()).append("\" author=\"xwikiorg\">\n") |
66 |
|
.append(" <preConditions onFail=\"CONTINUE\">\n") |
67 |
|
.append(" <tableExists tableName=\"activitystream_events\"/>\n") |
68 |
|
.append(" <columnExists tableName=\"activitystream_events\" columnName=\"ase_requestid\"/>\n") |
69 |
|
.append(" </preConditions>") |
70 |
|
.append(" <comment>Reduce the size of the ASE_REQUESTID column to 48-chars</comment>\n") |
71 |
|
.append(" <modifyDataType tableName=\"activitystream_events\"") |
72 |
|
.append(" columnName=\"ase_requestid\" newDataType=\"varchar(48)\"/>\n") |
73 |
|
.append(" </changeSet>\n"); |
74 |
0 |
return result.toString(); |
75 |
|
} |
76 |
|
} |