mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
refactor(db): Migrate mangaCategory queries (that can be migrated) to SQLDelight
This commit is contained in:
parent
726613e6d7
commit
e8054855ac
10 changed files with 71 additions and 24 deletions
|
@ -7,3 +7,15 @@ CREATE TABLE mangas_categories(
|
|||
FOREIGN KEY(manga_id) REFERENCES mangas (_id)
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
|
||||
delete:
|
||||
DELETE FROM mangas_categories
|
||||
WHERE manga_id = :mangaId;
|
||||
|
||||
deleteBulk:
|
||||
DELETE FROM mangas_categories
|
||||
WHERE manga_id IN :mangaIds;
|
||||
|
||||
insert:
|
||||
INSERT INTO mangas_categories(manga_id, category_id)
|
||||
VALUES (:mangaId, :categoryId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue