mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-02 10:43:08 +00:00
## What changed? <!-- Describe what has changed in this PR --> Restored schema scripts for `nexus_incoming_services` Added new schema revisions to drop `nexus_incoming_services` tables and create `nexus_endpoint` tables ## Why? <!-- Tell your future self why have you made these changes --> OSS v1.24 was released using an older schema change from before incoming services were renamed to endpoints, so we need to keep that to avoid breaking schema upgrades
18 lines
753 B
Cassandra CQL
18 lines
753 B
Cassandra CQL
DROP TABLE nexus_incoming_services;
|
|
|
|
CREATE TABLE nexus_endpoints
|
|
(
|
|
partition int, -- constant for all rows (using a single partition for efficient list queries)
|
|
type int, -- enum RowType { PartitionStatus, NexusEndpoint }
|
|
id uuid,
|
|
data blob,
|
|
data_encoding text,
|
|
-- When type=PartitionStatus contains the partition version.
|
|
-- Partition version is used to guarantee latest versions when listing all endpoints.
|
|
-- When type=NexusEndpoint contains the endpoint version used for optimistic concurrency.
|
|
version bigint,
|
|
PRIMARY KEY ((partition), type, id)
|
|
) WITH COMPACTION = {
|
|
'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
|
|
};
|