0fc6c68a99
Issue persistent signed anonymous IDs and accept cookie/token-bound events. Resolve verified email, phone, OAuth, and namespaced third-party IDs into transactionally merged master identities with historical event aliases. Protect shared-device account switching, tenant isolation, and event retries. Store sparse canonical profiles as PostgreSQL JSONB or local SQLite JSON. Support an optional versioned Cassandra wide-column projection through a transactional outbox, retry worker, and immediate canonical read fallback. Document deployment settings and provide opt-in database integration tests. Validation: 43 local tests passed; 6 external database tests skipped. Ruff checks, formatting, and offline uv lock verification passed.
15 lines
559 B
Cassandra CQL
15 lines
559 B
Cassandra CQL
-- Example for a single datacenter named datacenter1; set production RF appropriately.
|
|
CREATE KEYSPACE IF NOT EXISTS adcloud
|
|
WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 1};
|
|
|
|
-- Each immutable profile revision is a separate bounded partition.
|
|
-- Sparse attributes are individual fields; absent attributes occupy no rows.
|
|
CREATE TABLE IF NOT EXISTS adcloud.identity_profile_fields (
|
|
tenant_id text,
|
|
master_id text,
|
|
revision int,
|
|
field text,
|
|
value text,
|
|
PRIMARY KEY ((tenant_id, master_id, revision), field)
|
|
);
|