mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
changelog: Fix primary key (Copying calendars was broken)
This commit is contained in:
@@ -32,7 +32,7 @@ CREATE TABLE calendarobjectchangelog (
|
||||
"operation" INTEGER NOT NULL,
|
||||
synctoken INTEGER DEFAULT 0 NOT NULL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (principal, cal_id, created_at),
|
||||
PRIMARY KEY (principal, cal_id, synctoken, created_at),
|
||||
FOREIGN KEY (principal, cal_id)
|
||||
REFERENCES calendars (principal, id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
@@ -27,7 +27,7 @@ CREATE TABLE addressobjectchangelog (
|
||||
"operation" INTEGER NOT NULL,
|
||||
synctoken INTEGER DEFAULT 0 NOT NULL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (principal, addressbook_id, created_at),
|
||||
PRIMARY KEY (principal, addressbook_id, synctoken, created_at),
|
||||
FOREIGN KEY (principal, addressbook_id)
|
||||
REFERENCES addressbooks (principal, id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user