56
}
57
59
>
return `
60
>
-- test cql file content
61
>
62
>
CREATE TABLE events (
63
>
namespace_id uuid,
64
>
workflow_id text,
65
>
run_id uuid,
66
>
-- We insert a batch of events with each append transaction.
67
>
-- This field stores the event id of first event in the batch.
68
>
first_event_id bigint,
69
>
range_id bigint,
70
>
tx_id bigint,
71
>
data blob, -- Batch of workflow execution history events as a blob
72
>
data_encoding text, -- Protocol used for history serialization
73
>
data_version int, -- history blob version
74
>
PRIMARY KEY ((namespace_id, workflow_id, run_id), first_event_id)
75
>
);
76
>
77
>
-- Stores activity or workflow tasks
78
>
CREATE TABLE tasks (
79
>
namespace_id uuid,
80
>
task_queue_name text,
81
>
task_queue_type int, -- enum TaskQueueType {ActivityTask, WorkflowTask}
82
>
type int, -- enum rowType {Task, TaskQueue}
83
>
task_id bigint, -- unique identifier for tasks, monotonically increasing
84
>
range_id bigint static, -- Used to ensure that only one process can write to the table
85
>
task text,
86
>
task_queue text,
87
>
PRIMARY KEY ((namespace_id, task_queue_name, task_queue_type), type, task_id)
88
>
);
89
>
90
>
`
91
>
}