mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 07:02:24 +00:00
changelog: Fix primary key (Copying calendars was broken)
This commit is contained in:
12
.sqlx/query-526c4a9326db7f026eee15cca358943b0546fe56fc09204f1dfe90e2614f99b9.json
generated
Normal file
12
.sqlx/query-526c4a9326db7f026eee15cca358943b0546fe56fc09204f1dfe90e2614f99b9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO addressobjectchangelog (principal, addressbook_id, object_id, \"operation\", synctoken)\n VALUES (?1, ?2, ?3, ?4, (\n SELECT synctoken FROM addressbooks WHERE (principal, id) = (?1, ?2)\n ))",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "526c4a9326db7f026eee15cca358943b0546fe56fc09204f1dfe90e2614f99b9"
|
||||||
|
}
|
||||||
12
.sqlx/query-77ad562b6d78115ebb726d58cf1e4de69df169c1872cb452488ff8c43ed983a9.json
generated
Normal file
12
.sqlx/query-77ad562b6d78115ebb726d58cf1e4de69df169c1872cb452488ff8c43ed983a9.json
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "\n INSERT INTO calendarobjectchangelog (principal, cal_id, object_id, \"operation\", synctoken)\n VALUES (?1, ?2, ?3, ?4, (\n SELECT synctoken FROM calendars WHERE (principal, id) = (?1, ?2)\n ))",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 4
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "77ad562b6d78115ebb726d58cf1e4de69df169c1872cb452488ff8c43ed983a9"
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "\n INSERT INTO addressobjectchangelog (principal, addressbook_id, object_id, operation, synctoken)\n VALUES (?1, ?2, ?3, ?4, (\n SELECT synctoken FROM addressbooks WHERE (principal, id) = (?1, ?2)\n ))",
|
|
||||||
"describe": {
|
|
||||||
"columns": [],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 4
|
|
||||||
},
|
|
||||||
"nullable": []
|
|
||||||
},
|
|
||||||
"hash": "d0031fbbd6cf023e3f5ef8e6006723b7ff654b69699e4cbc8177941c9d414105"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "\n INSERT INTO calendarobjectchangelog (principal, cal_id, object_id, operation, synctoken)\n VALUES (?1, ?2, ?3, ?4, (\n SELECT synctoken FROM calendars WHERE (principal, id) = (?1, ?2)\n ))",
|
|
||||||
"describe": {
|
|
||||||
"columns": [],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 4
|
|
||||||
},
|
|
||||||
"nullable": []
|
|
||||||
},
|
|
||||||
"hash": "dbdbcd1f295ab098820574329d9fd1ddb4ee4d40c5e1f476b23ccc23321c18e2"
|
|
||||||
}
|
|
||||||
@@ -32,7 +32,7 @@ CREATE TABLE calendarobjectchangelog (
|
|||||||
"operation" INTEGER NOT NULL,
|
"operation" INTEGER NOT NULL,
|
||||||
synctoken INTEGER DEFAULT 0 NOT NULL,
|
synctoken INTEGER DEFAULT 0 NOT NULL,
|
||||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
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)
|
FOREIGN KEY (principal, cal_id)
|
||||||
REFERENCES calendars (principal, id) ON DELETE CASCADE
|
REFERENCES calendars (principal, id) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ CREATE TABLE addressobjectchangelog (
|
|||||||
"operation" INTEGER NOT NULL,
|
"operation" INTEGER NOT NULL,
|
||||||
synctoken INTEGER DEFAULT 0 NOT NULL,
|
synctoken INTEGER DEFAULT 0 NOT NULL,
|
||||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
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)
|
FOREIGN KEY (principal, addressbook_id)
|
||||||
REFERENCES addressbooks (principal, id) ON DELETE CASCADE
|
REFERENCES addressbooks (principal, id) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user