Skip to content

Commit dbaa820

Browse files
committed
[ITB-2068] Unable to create conformance snapshots (baseline update)
1 parent d5bab23 commit dbaa820

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (C) 2026 European Union
3+
*
4+
* Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the European Commission - subsequent
5+
* versions of the EUPL (the "Licence"); You may not use this work except in compliance with the Licence.
6+
*
7+
* You may obtain a copy of the Licence at:
8+
*
9+
* https://interoperable-europe.ec.europa.eu/collection/eupl/eupl-text-eupl-12
10+
*
11+
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an
12+
* "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for
13+
* the specific language governing permissions and limitations under the Licence.
14+
*/
15+
16+
package db.migration.default
17+
18+
import org.flywaydb.core.api.migration.{BaseJavaMigration, Context}
19+
import org.slf4j.LoggerFactory
20+
21+
import java.sql.SQLException
22+
23+
class V125_1__Add_missing_testcase_group_to_snapshots extends BaseJavaMigration {
24+
25+
private def LOG = LoggerFactory.getLogger(classOf[V125_1__Add_missing_testcase_group_to_snapshots])
26+
27+
override def migrate(context: Context): Unit = {
28+
val statement = context.getConnection.createStatement()
29+
try {
30+
statement.execute("ALTER TABLE `conformancesnapshotresults` ADD COLUMN `test_case_group_id` BIGINT")
31+
LOG.info("Column 'test_case_group_id' added")
32+
} catch {
33+
case e: SQLException if e.getErrorCode == 1060 =>
34+
LOG.info("Column 'test_case_group_id' already present")
35+
} finally {
36+
statement.close()
37+
}
38+
}
39+
40+
}

0 commit comments

Comments
 (0)