mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Simplify SQL
This commit is contained in:
parent
3af5aa8949
commit
ec4afe874c
1 changed files with 2 additions and 3 deletions
|
@ -14,7 +14,6 @@ SELECT S.* FROM (
|
|||
) AS S;
|
||||
|
||||
-- Replace seperator from ' & ' to less common ' [.] '
|
||||
WITH tmp(_id, filtered_scanlators) AS (SELECT _id, replace(filtered_scanlators, ' & ', ' [.] ') FROM mangas)
|
||||
UPDATE mangas
|
||||
SET filtered_scanlators = (SELECT filtered_scanlators FROM tmp)
|
||||
WHERE _id IN (SELECT _id FROM tmp);
|
||||
SET filtered_scanlators = replace(filtered_scanlators, ' & ', ' [.] ')
|
||||
WHERE filtered_scanlators IS NOT NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue