stacker.news/prisma/migrations/20230620152940_meta_sub/migration.sql

7 lines
345 B
MySQL
Raw Normal View History

2023-06-20 16:26:23 +00:00
INSERT INTO "Sub" ("name", "desc", "postTypes", "rankingType")
VALUES ('meta', 'everything about SN', '{LINK,DISCUSSION,POLL,BOUNTY}', 'WOT') ON CONFLICT DO NOTHING;
-- transfer all posts related to SN to meta
UPDATE "Item"
SET "subName" = 'meta'
WHERE lower(title) SIMILAR TO lower('(% )?SN( %)?|(% )?k00b( %)?|(% )?keyan( %)?|(% )?SNL( %)?');