Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 2 additions & 4 deletions schema/mysql/v57/temporal/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,17 @@ CREATE TABLE current_executions(
);

CREATE TABLE buffered_events (
id BIGINT AUTO_INCREMENT NOT NULL,
shard_id INT NOT NULL,
namespace_id BINARY(16) NOT NULL,
workflow_id VARCHAR(255) NOT NULL,
run_id BINARY(16) NOT NULL,
id BIGINT AUTO_INCREMENT NOT NULL UNIQUE,
--
data MEDIUMBLOB NOT NULL,
data_encoding VARCHAR(16) NOT NULL,
PRIMARY KEY (id)
PRIMARY KEY (shard_id, namespace_id, workflow_id, run_id, id)
);

CREATE INDEX buffered_events_by_events_ids ON buffered_events(shard_id, namespace_id, workflow_id, run_id);

CREATE TABLE tasks (
range_hash INT UNSIGNED NOT NULL,
task_queue_id VARBINARY(255) NOT NULL,
Expand Down
6 changes: 2 additions & 4 deletions schema/mysql/v57/temporal/versioned/v1.0/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,17 @@ CREATE TABLE current_executions(
);

CREATE TABLE buffered_events (
id BIGINT AUTO_INCREMENT NOT NULL,
shard_id INT NOT NULL,
namespace_id BINARY(16) NOT NULL,
workflow_id VARCHAR(255) NOT NULL,
run_id BINARY(16) NOT NULL,
id BIGINT AUTO_INCREMENT NOT NULL UNIQUE,
--
data MEDIUMBLOB NOT NULL,
data_encoding VARCHAR(16) NOT NULL,
PRIMARY KEY (id)
PRIMARY KEY (shard_id, namespace_id, workflow_id, run_id, id)
);

CREATE INDEX buffered_events_by_events_ids ON buffered_events(shard_id, namespace_id, workflow_id, run_id);

CREATE TABLE tasks (
range_hash INT UNSIGNED NOT NULL,
task_queue_id VARBINARY(255) NOT NULL,
Expand Down
6 changes: 2 additions & 4 deletions schema/postgres/temporal/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,17 @@ CREATE TABLE current_executions(
);

CREATE TABLE buffered_events (
id BIGSERIAL NOT NULL,
shard_id INTEGER NOT NULL,
namespace_id BYTEA NOT NULL,
workflow_id VARCHAR(255) NOT NULL,
run_id BYTEA NOT NULL,
id BIGSERIAL NOT NULL UNIQUE,
--
data BYTEA NOT NULL,
data_encoding VARCHAR(16) NOT NULL,
PRIMARY KEY (id)
PRIMARY KEY (shard_id, namespace_id, workflow_id, run_id, id)
);

CREATE INDEX buffered_events_by_events_ids ON buffered_events(shard_id, namespace_id, workflow_id, run_id);

CREATE TABLE tasks (
range_hash BIGINT NOT NULL,
task_queue_id BYTEA NOT NULL,
Expand Down
6 changes: 2 additions & 4 deletions schema/postgres/temporal/versioned/v1.0/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,17 @@ CREATE TABLE current_executions(
);

CREATE TABLE buffered_events (
id BIGSERIAL NOT NULL,
shard_id INTEGER NOT NULL,
namespace_id BYTEA NOT NULL,
workflow_id VARCHAR(255) NOT NULL,
run_id BYTEA NOT NULL,
id BIGSERIAL NOT NULL UNIQUE,
--
data BYTEA NOT NULL,
data_encoding VARCHAR(16) NOT NULL,
PRIMARY KEY (id)
PRIMARY KEY (shard_id, namespace_id, workflow_id, run_id, id)
);

CREATE INDEX buffered_events_by_events_ids ON buffered_events(shard_id, namespace_id, workflow_id, run_id);

CREATE TABLE tasks (
range_hash BIGINT NOT NULL,
task_queue_id BYTEA NOT NULL,
Expand Down