Skip to content

Commit f4f2eac

Browse files
committed
Move upgrade script
1 parent f52a619 commit f4f2eac

File tree

4 files changed

+12
-113
lines changed

4 files changed

+12
-113
lines changed

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42010to42020.java

Lines changed: 0 additions & 73 deletions
This file was deleted.

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42210to42300.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.cloud.upgrade.dao;
1818

1919
import java.io.InputStream;
20+
import java.sql.Connection;
2021

2122
import com.cloud.utils.exception.CloudRuntimeException;
2223

@@ -42,4 +43,15 @@ public InputStream[] getPrepareScripts() {
4243

4344
return new InputStream[] {script};
4445
}
46+
47+
@Override
48+
public void performDataMigration(Connection conn) {
49+
addIndexes(conn);
50+
}
51+
52+
private void addIndexes(Connection conn) {
53+
DbUpgradeUtils.addIndexWithNameIfNeeded(conn, "event", "i_event__multiple_columns_for_generic_search",
54+
"account_id", "domain_id", "archived", "display", "resource_type", "resource_id", "start_id", "type", "level",
55+
"created", "id");
56+
}
4557
}

engine/schema/src/main/resources/META-INF/db/schema-42010to42020-cleanup.sql

Lines changed: 0 additions & 20 deletions
This file was deleted.

engine/schema/src/main/resources/META-INF/db/schema-42010to42020.sql

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)