delete producttitles and report back (#487)
* delete producttitles and report back * move file to correct migration number
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
WITH deleted_textids AS (
|
||||
SELECT textid FROM "i18n-texts" WHERE category = 'productTitles'
|
||||
),
|
||||
deleted_data AS (
|
||||
DELETE FROM "i18n-texts_data"
|
||||
WHERE textid IN (SELECT textid FROM deleted_textids)
|
||||
RETURNING textid
|
||||
),
|
||||
deleted_texts AS (
|
||||
DELETE FROM "i18n-texts"
|
||||
WHERE textid IN (SELECT textid FROM deleted_textids)
|
||||
RETURNING textid
|
||||
)
|
||||
SELECT
|
||||
(SELECT COUNT(*) FROM deleted_data) AS deleted_data_count,
|
||||
(SELECT COUNT(*) FROM deleted_texts) AS deleted_texts_count;
|
||||
Reference in New Issue
Block a user