Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 92 Release Notes

### Migration of PK to BIGINT
The PK of the JOB_KEY_VALUE_ENTRY table will be migrated from INT to BIGINT.

### AWS ECR Docker Remote Hashing
* Fixed an issue where ECR images without an explicit repository prefix
(e.g., `123456789012.dkr.ecr.us-east-1.amazonaws.com/example-tool`) would fail during remote hash computation due to incorrect manifest URI construction.
Expand Down
1 change: 1 addition & 0 deletions database/migration/src/main/resources/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<include file="changesets/workflow_store_drop_state_index.xml" relativeToChangelogFile="true" />
<include file="changesets/add_group_metrics_table.xml" relativeToChangelogFile="true" />
<include file="changesets/add_group_metrics_unique_constraint.xml" relativeToChangelogFile="true" />
<include file="changesets/enlarge_job_key_value_entry_id.xml" relativeToChangelogFile="true" />
<!-- WARNING!
This changeset should always be last.
It is always run (and should always run last) to set table ownership correctly.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog objectQuotingStrategy="QUOTE_ALL_OBJECTS"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">

<!-- BEGIN JOB_KEY_VALUE_ENTRY PK widening -->
<!-- For Postgresql there are 2 changesets: one for modifying the table column type, and another one for altering the autoincrementing sequence.
The other DBs can be refactored similarly with a single addAutoIncrement changeset. -->
<changeSet author="lbaldo" id="enlarge_job_key_value_entry_id" dbms="mysql,hsqldb,mariadb">
<addAutoIncrement
columnName="JOB_KEY_VALUE_ENTRY_ID"
columnDataType="BIGINT"
incrementBy="1"
tableName="JOB_KEY_VALUE_ENTRY"
/>
</changeSet>

<changeSet author="lbaldo" id="postgresql_enlarge_job_key_value_entry_id" dbms="postgresql">
<modifyDataType
columnName="JOB_KEY_VALUE_ENTRY_ID"
tableName="JOB_KEY_VALUE_ENTRY"
newDataType="BIGINT"
/>
</changeSet>

<changeSet author="lbaldoh" id="postgresql_enlarge_job_key_value_entry_id_seq" dbms="postgresql">
<preConditions onFail="MARK_RAN">
<!-- idempotency check (noop if the sequence is present and already consistent what the alter would do) -->
<sqlCheck expectedResult="0">
SELECT count(*)
FROM information_schema.sequences
WHERE sequence_name = 'JOB_KEY_VALUE_ENTRY_JOB_KEY_VALUE_ENTRY_ID_seq'
AND data_type = 'bigint';
</sqlCheck>
</preConditions>
<sql>alter sequence "JOB_KEY_VALUE_ENTRY_JOB_KEY_VALUE_ENTRY_ID_seq" as bigint;</sql>
</changeSet>
<!-- END JOB_KEY_VALUE_ENTRY PK widening -->

</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait JobKeyValueEntryComponent {
import driver.api._

class JobKeyValueEntries(tag: Tag) extends Table[JobKeyValueEntry](tag, "JOB_KEY_VALUE_ENTRY") {
def jobKeyValueEntryId = column[Int]("JOB_KEY_VALUE_ENTRY_ID", O.PrimaryKey, O.AutoInc)
def jobKeyValueEntryId = column[Long]("JOB_KEY_VALUE_ENTRY_ID", O.PrimaryKey, O.AutoInc)

def workflowExecutionUuid = column[String]("WORKFLOW_EXECUTION_UUID", O.Length(255))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ case class JobKeyValueEntry(
jobAttempt: Int,
storeKey: String,
storeValue: String,
jobKeyValueEntryId: Option[Int] = None
jobKeyValueEntryId: Option[Long] = None
)
Loading