From e7a4ccecf39c3ab5229430ceda115522189aa118 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 24 Sep 2023 04:29:43 +0200 Subject: [PATCH] Renamed Natasha Teen Productions to Natasha Teen Films. --- seeds/03_studios.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/seeds/03_studios.js b/seeds/03_studios.js index d299c5631..5fc38f989 100755 --- a/seeds/03_studios.js +++ b/seeds/03_studios.js @@ -74,8 +74,9 @@ const studios = [ showcased: true, }, { - name: 'Natasha Teen Productions', - slug: 'natashateenproductions', + name: 'Natasha Teen Films', + slug: 'natashateenfilms', + rename: 'natashateenproductions', url: 'https://www.analvids.com/studios/natasha-teen-productions', parent: 'analvids', alias: [ @@ -5238,6 +5239,19 @@ const studios = [ /* eslint-disable max-len */ exports.seed = (knex) => Promise.resolve() .then(async () => { + await Promise.all(studios.map(async (studio) => { + if (studio.rename) { + return knex('entities') + .where({ + type: studio.type || 'studio', + slug: studio.rename, + }) + .update('slug', studio.slug); + } + + return null; + }).filter(Boolean)); + const networks = await knex('entities') .whereIn('type', ['network', 'channel']) .whereIn('slug', studios.map((studio) => studio.parent));