- Introduced tests for drift operations UI and backend to ensure proper handling of ignore rules and UI elements. - Added tests for email identity API to validate email linking and identity retrieval without updates. - Implemented tests for email purchase link service to verify correct handling of purchase mail links and conflict scenarios. - Created tests for email reply automation to ensure proper routing and processing of replies based on classification. - Developed tests for email sender creation to validate suggestions and handling of existing contacts and companies. - Added tests for email sender identity to ensure correct matching of contacts and domains. - Implemented tests for work desk functionalities to validate task management, meeting registrations, and timer functionalities.
12 lines
517 B
SQL
12 lines
517 B
SQL
-- Additive support for local customer merges. No existing rows are changed.
|
|
ALTER TABLE customers ADD COLUMN IF NOT EXISTS merged_into_customer_id INTEGER REFERENCES customers(id);
|
|
CREATE TABLE IF NOT EXISTS customer_merge_history (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
target_customer_id INTEGER NOT NULL REFERENCES customers(id),
|
|
source_customer_ids INTEGER[] NOT NULL,
|
|
actor_id INTEGER NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
snapshot JSONB NOT NULL,
|
|
movements JSONB NOT NULL
|
|
);
|