diff --git a/schema/cassandra/cadence/schema.cql b/schema/cassandra/cadence/schema.cql index 3575a90a14f..15536398e11 100644 --- a/schema/cassandra/cadence/schema.cql +++ b/schema/cassandra/cadence/schema.cql @@ -134,6 +134,7 @@ CREATE TYPE transfer_task ( schedule_id bigint, version bigint, -- the failover version when this task is created, used to compare against the mutable state, in case the events got overwritten record_visibility boolean, -- indicates whether or not to create a visibility record + original_task_list text, -- the original task list of the task if the task is a sticky decision task ); CREATE TYPE replication_task ( @@ -166,6 +167,7 @@ CREATE TYPE timer_task ( event_id bigint, -- Corresponds to event ID in history that is responsible for this timer. schedule_attempt bigint, -- Used to retry failed decision tasks using mutable state version bigint, -- the failover version when this task is created, used to compare against the mutable state, in case the events got overwritten + task_list text, -- the task list associated with the timer task ); -- Workflow activity in progress mutable state @@ -548,7 +550,7 @@ CREATE TABLE domain_audit_log ( state_after blob, -- state_after stores the domain state after the request state_after_encoding text, -- the encoding type used for state_after - operation_type int, -- operation_type stores the type of operation that was performed. It is deserialized as an enum and can be used to customize the serialization/deserialization strategy. + operation_type int, -- operation_type stores the type of operation that was performed. It is deserialized as an enum and can be used to customize the serialization/deserialization strategy. created_time timestamp, -- created_time the time this row was inserted last_updated_time timestamp, diff --git a/schema/cassandra/cadence/versioned/v0.45/manifest.json b/schema/cassandra/cadence/versioned/v0.45/manifest.json new file mode 100644 index 00000000000..b4f90f733eb --- /dev/null +++ b/schema/cassandra/cadence/versioned/v0.45/manifest.json @@ -0,0 +1,9 @@ +{ + "CurrVersion": "0.45", + "MinCompatibleVersion": "0.45", + "Description": "Adding original_task_list and task_list to transfer and timer tasks", + "SchemaUpdateCqlFiles": [ + "transfer_task.cql", + "timer_task.cql" + ] +} diff --git a/schema/cassandra/cadence/versioned/v0.45/timer_task.cql b/schema/cassandra/cadence/versioned/v0.45/timer_task.cql new file mode 100644 index 00000000000..c62bd538fe3 --- /dev/null +++ b/schema/cassandra/cadence/versioned/v0.45/timer_task.cql @@ -0,0 +1 @@ +ALTER TYPE timer_task ADD task_list text; diff --git a/schema/cassandra/cadence/versioned/v0.45/transfer_task.cql b/schema/cassandra/cadence/versioned/v0.45/transfer_task.cql new file mode 100644 index 00000000000..4d079773f9b --- /dev/null +++ b/schema/cassandra/cadence/versioned/v0.45/transfer_task.cql @@ -0,0 +1 @@ +ALTER TYPE transfer_task ADD original_task_list text; diff --git a/schema/cassandra/version.go b/schema/cassandra/version.go index ca1ea5418fb..ad289465f51 100644 --- a/schema/cassandra/version.go +++ b/schema/cassandra/version.go @@ -23,7 +23,7 @@ package cassandra // NOTE: whenever there is a new data base schema update, plz update the following versions // Version is the Cassandra database release version -const Version = "0.44" +const Version = "0.45" // VisibilityVersion is the Cassandra visibility database release version const VisibilityVersion = "0.10" diff --git a/tools/common/schema/updatetask_test.go b/tools/common/schema/updatetask_test.go index 8faa65bb143..4eb26c25271 100644 --- a/tools/common/schema/updatetask_test.go +++ b/tools/common/schema/updatetask_test.go @@ -116,7 +116,7 @@ func (s *UpdateTaskTestSuite) TestReadSchemaDirFromEmbeddings() { s.NoError(err) ans, err := readSchemaDir(fsys, "0.30", "") s.NoError(err) - s.Equal([]string{"v0.31", "v0.32", "v0.33", "v0.34", "v0.35", "v0.36", "v0.37", "v0.38", "v0.39", "v0.40", "v0.41", "v0.42", "v0.43", "v0.44"}, ans) + s.Equal([]string{"v0.31", "v0.32", "v0.33", "v0.34", "v0.35", "v0.36", "v0.37", "v0.38", "v0.39", "v0.40", "v0.41", "v0.42", "v0.43", "v0.44", "v0.45"}, ans) fsys, err = fs.Sub(cassandra.SchemaFS, "visibility/versioned") s.NoError(err)