feat(crm): complete contact label avatar gaps
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS contact_labels;
|
||||
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS contact_labels (
|
||||
contact_id INTEGER NOT NULL,
|
||||
tag_id INTEGER NOT NULL,
|
||||
account_id INTEGER NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (contact_id, tag_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_contact_labels_contact_id ON contact_labels(contact_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_contact_labels_tag_id ON contact_labels(tag_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_contact_labels_account_id ON contact_labels(account_id);
|
||||
Reference in New Issue
Block a user