mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
added missing primary keys
This commit is contained in:
parent
b6e2a10f4f
commit
7e1280caae
@ -238,7 +238,8 @@ bool DataBaseManagement::createV8Tables(QSqlDatabase &database)
|
|||||||
"label_id INTEGER, "
|
"label_id INTEGER, "
|
||||||
//"order INTEGER, " //TODO order????
|
//"order INTEGER, " //TODO order????
|
||||||
"FOREIGN KEY(label_id) REFERENCES label(id) ON DELETE CASCADE, "
|
"FOREIGN KEY(label_id) REFERENCES label(id) ON DELETE CASCADE, "
|
||||||
"FOREIGN KEY(comic_id) REFERENCES comic(id) ON DELETE CASCADE)");
|
"FOREIGN KEY(comic_id) REFERENCES comic(id) ON DELETE CASCADE, "
|
||||||
|
"PRIMARY KEY(label_id, comic_id))");
|
||||||
success = success && queryComicLabel.exec();
|
success = success && queryComicLabel.exec();
|
||||||
|
|
||||||
//READING LIST
|
//READING LIST
|
||||||
@ -260,7 +261,8 @@ bool DataBaseManagement::createV8Tables(QSqlDatabase &database)
|
|||||||
"comic_id INTEGER, "
|
"comic_id INTEGER, "
|
||||||
"ordering INTEGER, "
|
"ordering INTEGER, "
|
||||||
"FOREIGN KEY(reading_list_id) REFERENCES reading_list(id) ON DELETE CASCADE, "
|
"FOREIGN KEY(reading_list_id) REFERENCES reading_list(id) ON DELETE CASCADE, "
|
||||||
"FOREIGN KEY(comic_id) REFERENCES comic(id) ON DELETE CASCADE)");
|
"FOREIGN KEY(comic_id) REFERENCES comic(id) ON DELETE CASCADE, "
|
||||||
|
"PRIMARY KEY(reading_list_id, comic_id))");
|
||||||
success = success && queryComicReadingList.exec();
|
success = success && queryComicReadingList.exec();
|
||||||
|
|
||||||
//DEFAULT READING LISTS
|
//DEFAULT READING LISTS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user