const upsert = require('../src/utils/upsert'); const studios = [ // LegalPorno { slug: 'gonzocom', name: 'Gonzo.com', alias: ['sz'], url: 'https://www.legalporno.com/studios/gonzo_com', parent: 'legalporno', }, { slug: 'giorgiograndi', name: 'Giorgio Grandi', url: 'https://www.legalporno.com/studios/giorgio-grandi', alias: ['gio'], parent: 'legalporno', }, { slug: 'hardpornworld', name: 'Hard Porn World', url: 'https://www.legalporno.com/studios/hard-porn-world', alias: ['gp'], parent: 'legalporno', }, { slug: 'interracialvision', name: 'Interracial Vision', url: 'https://www.legalporno.com/studios/interracial-vision', alias: ['iv'], parent: 'legalporno', }, { slug: 'giorgioslab', name: 'Giorgio\'s Lab', url: 'https://www.legalporno.com/studios/giorgio--s-lab', alias: ['gl'], parent: 'legalporno', }, { slug: 'americananal', name: 'American Anal', url: 'https://www.legalporno.com/studios/american-anal', alias: ['aa'], parent: 'legalporno', }, { slug: 'assablanca', name: 'Assablanca', url: 'https://www.legalporno.com/studios/assablanca', alias: ['ab'], parent: 'legalporno', }, { slug: 'focus', name: 'Focus', url: 'https://www.legalporno.com/studios/focus', alias: ['fs'], parent: 'legalporno', }, { slug: 'anal4her', name: 'Anal 4 Her', url: 'https://www.legalporno.com/studios/anal-4-her', alias: ['af', 'anal forever'], parent: 'legalporno', }, { slug: 'gonzoinbrazil', name: 'Gonzo in Brazil', url: 'https://www.legalporno.com/studios/gonzo-in-brazil', alias: ['bz'], parent: 'legalporno', }, { slug: 'mranal', name: 'Mr Anal', url: 'https://www.legalporno.com/studios/mr-anal', alias: ['ma'], parent: 'legalporno', }, { slug: 'tarrawhite', name: 'Tarra White', url: 'https://www.legalporno.com/studios/tarra-white', alias: ['tw'], parent: 'legalporno', }, { slug: 'sineplexsos', name: 'Sineplex SOS', url: 'https://www.legalporno.com/studios/sineplex-sos', alias: ['rs'], parent: 'legalporno', }, { slug: 'fmodels', name: 'F Models', url: 'https://www.legalporno.com/studios/f-models', alias: ['fm'], parent: 'legalporno', }, { slug: 'sineplexcz', name: 'Sineplex CZ', url: 'https://www.legalporno.com/studios/sineplex-cz', alias: ['sz'], parent: 'legalporno', }, { slug: 'gg', name: 'GG', url: 'https://www.legalporno.com/studios/gg', parent: 'legalporno', }, { slug: 'firstgape', name: 'First Gape', url: 'https://www.legalporno.com/studios/first-gape', alias: ['sal'], parent: 'legalporno', }, { slug: 'omargalantiproductions', name: 'Omar Galanti Productions', url: 'https://www.legalporno.com/studios/omar-galanti-productions', parent: 'legalporno', }, { slug: 'marywet', name: 'Marywet', url: 'https://www.legalporno.com/studios/marywet', alias: ['ots'], parent: 'legalporno', }, { slug: 'norestfortheass', name: 'No Rest For The Ass', url: 'https://www.legalporno.com/studios/no-rest-for-the-ass', alias: ['nr'], parent: 'legalporno', }, { slug: 'hairygonzo', name: 'Hairy Gonzo', url: 'https://www.legalporno.com/studios/hairy-gonzo', alias: ['hg'], parent: 'legalporno', }, { slug: 'sineplexclassic', name: 'Sineplex Classic', url: 'https://www.legalporno.com/studios/sineplex-classic', parent: 'legalporno', }, { slug: 'sinemale', name: 'Sinemale', url: 'https://www.legalporno.com/studios/sinemale', parent: 'legalporno', }, { slug: 'outsidethestudio', name: 'Outside The Studio', url: 'https://www.legalporno.com/studios/outside-the-studio', alias: ['ots'], parent: 'legalporno', }, { slug: 'kinkysex', name: 'Kinky Sex', url: 'https://www.legalporno.com/studios/kinky-sex', alias: ['ks'], parent: 'legalporno', }, { slug: 'sexyangelproductions', name: 'Sexy Angel Productions', url: 'https://www.legalporno.com/studios/sexy-angel-productions', alias: ['sa'], parent: 'legalporno', }, { slug: 'nfstudio', name: 'N&F Studio', url: 'https://www.legalporno.com/studios/nf-studio', alias: ['nf'], parent: 'legalporno', }, { slug: 'natashateenproductions', name: 'Natasha Teen Productions', url: 'https://www.legalporno.com/studios/natasha-teen-productions', alias: ['nt'], parent: 'legalporno', }, { slug: 'mixedstudios', name: 'Mixed Studios', url: 'https://www.legalporno.com/studios/mixed-studios', alias: ['ms'], parent: 'legalporno', }, { slug: 'claudiasclips', name: 'Claudia\'s Clips', url: 'https://www.legalporno.com/studios/claudia--s-clips', alias: ['cm'], parent: 'legalporno', }, { slug: 'rebeccasclips', name: 'Rebecca\'s Clips', url: 'https://www.legalporno.com/studios/rebecca--s-clips', alias: ['rv'], parent: 'legalporno', }, { slug: 'private', name: 'Private', url: 'https://www.legalporno.com/studios/private', parent: 'legalporno', }, { slug: 'privatecastings', name: 'Private Castings', url: 'https://www.legalporno.com/studios/private-castings', parent: 'legalporno', }, { slug: 'privateblack', name: 'Private Black', url: 'https://www.legalporno.com/studios/private-black', parent: 'legalporno', }, { slug: 'nrxstudio', name: 'NRX Studio', url: 'https://www.legalporno.com/studios/nrx-studio', alias: ['nrx'], parent: 'legalporno', }, { slug: 'lpggg', name: 'GGG by John Thompson', url: 'https://www.legalporno.com/studios/ggg-by-john-thompson', parent: 'legalporno', }, { slug: 'yummyestudio', name: 'Yummy Estudio', url: 'https://www.legalporno.com/studios/yummy-estudio', alias: ['ye'], parent: 'legalporno', }, { slug: 'bustedtgirls', name: 'Busted T-Girls', url: 'https://www.legalporno.com/studios/busted-t-girls', alias: ['btg'], tags: ['transsexual'], parent: 'legalporno', }, { slug: 'analvidsbangbros', name: 'Bang Bros', url: 'https://www.legalporno.com/studios/bang-bros', parent: 'legalporno', }, { slug: 'vkstudio', name: 'VK Studio', url: 'https://www.legalporno.com/studios/vk-studio', alias: ['vk'], parent: 'legalporno', }, { slug: 'analmaniacs', name: 'Anal Maniacs by Lady Dee', url: 'https://www.legalporno.com/studios/anal-maniacs-by-lady-dee', alias: ['ld'], parent: 'legalporno', }, { slug: 'pineapplestestkitchen', name: 'Pineapple\'s Test Kitchen', url: 'https://www.legalporno.com/studios/pineapple--s-test-kitchen', alias: ['ax'], parent: 'legalporno', }, { slug: 'adelinelafouinestudio', name: 'Adeline Lafouine Studio', url: 'https://www.legalporno.com/studios/adeline-lafouine-studio', alias: ['al'], parent: 'legalporno', }, { slug: 'jeanmariecordastudio', name: 'Jean Marie Corda Studio', url: 'https://www.legalporno.com/studios/jean-marie-corda-studio', alias: ['jmc'], parent: 'legalporno', }, { slug: 'brianabanderasstudio', name: 'Briana Banderas Studio', url: 'https://www.legalporno.com/studios/briana-banderas-studio', alias: ['brb'], parent: 'legalporno', }, { slug: 'rickangelstudio', name: 'Rick Angel Studio', url: 'https://www.legalporno.com/studios/rick-angel-studio', alias: ['ra'], parent: 'legalporno', }, { slug: 'mamasitasavage', name: 'Mamasita Savage', url: 'https://www.legalporno.com/studios/mamasita-savage', alias: ['msv'], parent: 'legalporno', }, { slug: 'badbardotclub', name: 'Bad Bardot Club', url: 'https://www.legalporno.com/studios/bad-bardot-club', alias: ['bbc'], parent: 'legalporno', }, { slug: 'katerichstudio', name: 'Kate Rich Studio', url: 'https://www.legalporno.com/studios/kate-rich-studio', alias: ['krs'], parent: 'legalporno', }, { slug: 'daddyenjoy', name: 'DaddyEnjoy', url: 'https://www.legalporno.com/studios/daddyenjoy', alias: ['de'], parent: 'legalporno', }, { slug: 'laradesantisstudio', name: 'Lara De Santis Studio', url: 'https://www.legalporno.com/studios/lara-de-santis-studio', alias: ['lds'], parent: 'legalporno', }, { slug: 'lutrosworld', name: 'Lutro\'s World', url: 'https://www.legalporno.com/studios/lutro--s-world', alias: ['lw'], parent: 'legalporno', }, { slug: 'timeabellaproduction', name: 'Timea Bella Production', url: 'https://www.legalporno.com/studios/timea-bella-production', alias: ['tb'], parent: 'legalporno', }, { slug: 'angelwickysproduction', name: 'Angel Wicky\'s Production', url: 'https://www.legalporno.com/studios/angel-wicky%E2%80%99s-production', alias: ['aw'], parent: 'legalporno', }, { slug: 'bbcmaster', name: 'BBC Master', url: 'https://www.legalporno.com/studios/bbc-master', alias: ['jl'], parent: 'legalporno', }, { slug: 'maxrajoysquad', name: 'Max Rajoy Squad', url: 'https://www.legalporno.com/studios/max-rajoy-squad', alias: ['mrs'], parent: 'legalporno', }, { slug: 'queeneugenia', name: 'Queen Eugenia', url: 'https://www.legalporno.com/studios/queen-eugenia-studio', alias: ['qe'], parent: 'legalporno', }, { slug: 'helenamoellerstudio', name: 'Helena Moeller Studio', url: 'https://www.legalporno.com/studios/helena-moeller-studio', alias: ['hms'], parent: 'legalporno', }, { slug: 'allaboutsweetbunny', name: 'All About Sweet Bunny', url: 'https://www.legalporno.com/studios/all-about-sweet-bunny', alias: ['swb'], parent: 'legalporno', }, { slug: 'clubcandyalexa', name: 'Club Candy Alexa', url: 'https://www.legalporno.com/studios/club-candy-alexa', alias: ['cca'], parent: 'legalporno', }, { slug: 'stacybloomstudio', name: 'Stacy Bloom Studio', url: 'https://www.legalporno.com/studios/stacy-bloom-studio', alias: ['sbs'], parent: 'legalporno', }, { slug: 'harleenvanhyntenstudio', name: 'Harleen Van Hynten Studio', url: 'https://www.legalporno.com/studios/harleen-van-hynten-studio', alias: ['hvh'], parent: 'legalporno', }, { slug: 'cherryaleksastudio', name: 'Cherry Aleksa Studio', url: 'https://www.legalporno.com/studios/cherry-aleksa-studio', alias: ['ca'], parent: 'legalporno', }, { slug: 'possiblyneighbours', name: 'Possibly Neighbours', url: 'https://www.legalporno.com/studios/possibly-neighbours', alias: ['pn'], parent: 'legalporno', }, { slug: 'honourmaysmanorhouse', name: 'Honour Mays\' Manor House', url: 'https://www.legalporno.com/studios/honour-mays---manor-house', alias: ['hm'], parent: 'legalporno', }, { slug: 'adaralovestudio', name: 'Adara Love Studio', url: 'https://www.legalporno.com/studios/adara-love-studio', parent: 'legalporno', }, { slug: 'faplex', name: 'Faplex', url: 'https://www.legalporno.com/studios/faplex', parent: 'legalporno', }, { slug: 'analpornworld', name: 'Anal Porn World', url: 'https://www.legalporno.com/studios/anal-porn-world', parent: 'legalporno', }, { slug: 'xfreax', name: 'XfreaX', url: 'https://www.legalporno.com/studios/xfreax', parent: 'legalporno', }, { slug: 'rpsnstudio', name: 'RPSN Studio', url: 'https://www.legalporno.com/studios/rpsn-studio', parent: 'legalporno', }, { slug: 'queeneugeniastudio', name: 'Queen Eugenia Studio', url: 'https://www.legalporno.com/studios/queen-eugenia-studio', parent: 'legalporno', }, { slug: 'blessexxx', name: 'Blessexxx', url: 'https://www.legalporno.com/studios/blessexxx', parent: 'legalporno', }, { slug: 'thekrisskissexperience', name: 'The Kriss Kiss Experience', url: 'https://www.legalporno.com/studios/the-kriss-kiss-experience', parent: 'legalporno', }, { slug: 'analvidsxxxpawn', name: 'XXXPawn', url: 'https://www.legalporno.com/studios/xxxpawn', parent: 'legalporno', }, { slug: 'analvidsgaywire', name: 'Gaywire', url: 'https://www.legalporno.com/studios/gaywire', parent: 'legalporno', }, { slug: 'analvidsfilthyfamily', name: 'Filthy Family', url: 'https://www.legalporno.com/studios/filthy-family', parent: 'legalporno', }, { slug: 'analvidsbrandibelle', name: 'Brandi Belle', url: 'https://www.legalporno.com/studios/brandi-belle', parent: 'legalporno', }, { slug: 'analvidspublicinvasion', name: 'Public Invasion', url: 'https://www.legalporno.com/studios/public-invasion', parent: 'legalporno', }, { slug: 'kittyblairstudio', name: 'Kitty Blair Studio', url: 'https://www.legalporno.com/studios/kitty-blair-studio', parent: 'legalporno', }, { slug: 'bustyadventures', name: 'Busty Adventures', url: 'https://www.legalporno.com/studios/busty-adventures', parent: 'legalporno', }, { slug: 'analvidscollegerules', name: 'College Rules', url: 'https://www.legalporno.com/studios/college-rules', parent: 'legalporno', }, { slug: 'rockcorp', name: 'Rock Corp', url: 'https://www.legalporno.com/studios/rock-corp', parent: 'legalporno', }, { slug: 'analvidsbarebackattack', name: 'Bareback Attack', url: 'https://www.legalporno.com/studios/bareback-attack', parent: 'legalporno', }, { slug: 'analvidsbarebackcasting', name: 'Bareback Casting', url: 'https://www.legalporno.com/studios/bareback-casting', parent: 'legalporno', }, { slug: 'analvidsthughunter', name: 'Thug Hunter', url: 'https://www.legalporno.com/studios/thughunter', parent: 'legalporno', }, { slug: 'analvidsrubhim', name: 'Rub Him', url: 'https://www.legalporno.com/studios/rub-him', parent: 'legalporno', }, { slug: 'analvidsgaypawn', name: 'Gay Pawn', url: 'https://www.legalporno.com/studios/gay-pawn', parent: 'legalporno', }, { slug: 'analvidspoundhisass', name: 'PoundHisAss', url: 'https://www.legalporno.com/studios/poundhisass', parent: 'legalporno', }, { slug: 'analvidsfuckyoucracker', name: 'Fuck You Cracker', url: 'https://www.legalporno.com/studios/fuck-you-cracker', parent: 'legalporno', }, { slug: 'analvidstroopcandy', name: 'Troop Candy', url: 'https://www.legalporno.com/studios/troop-candy', parent: 'legalporno', }, { slug: 'analvidsgrabass', name: 'Grab Ass', url: 'https://www.legalporno.com/studios/grab-ass', parent: 'legalporno', }, { slug: 'analvidsbutterloads', name: 'Butter Loads', url: 'https://www.legalporno.com/studios/butter-loads', parent: 'legalporno', }, { slug: 'analvidsprojectcitybus', name: 'Project City Bus', url: 'https://www.legalporno.com/studios/project-city-bus', parent: 'legalporno', }, { slug: 'analvidsexbf', name: 'ExBF', url: 'https://www.legalporno.com/studios/exbf', parent: 'legalporno', }, { slug: 'analvidsungloryhole', name: 'UngloryHole', url: 'https://www.legalporno.com/studios/ungloryhole', parent: 'legalporno', }, { slug: 'editafantasystudio', name: 'Edita Fantasy Studio', url: 'https://www.legalporno.com/studios/edita-fantasy-studio', parent: 'legalporno', }, { slug: 'analvidsgaypatrol', name: 'Gay Patrol', url: 'https://www.legalporno.com/studios/gay-patrol', parent: 'legalporno', }, { slug: 'analvidsbaitbus', name: 'Bait Bus', url: 'https://www.legalporno.com/studios/bait-bus', parent: 'legalporno', }, { slug: 'analvidsoutinpublic', name: 'Out In Public', url: 'https://www.legalporno.com/studios/out-in-public', parent: 'legalporno', }, { slug: 'hornybelle', name: 'Horny Belle', url: 'https://www.legalporno.com/studios/horny-belle', parent: 'legalporno', }, { slug: 'suzieqstudio', name: 'Suzie Q Studio', url: 'https://www.legalporno.com/studios/suzie-q-studio', parent: 'legalporno', }, { slug: 'cherryontop', name: 'Cherry On Top', url: 'https://www.legalporno.com/studios/cherry-on-top', parent: 'legalporno', }, { slug: 'analvidsimmorallive', name: 'ImmoralLive', url: 'https://www.legalporno.com/studios/immorallive', parent: 'legalporno', }, { slug: 'viragoldfilms', name: 'Vira Gold Films', url: 'https://www.legalporno.com/studios/vira-gold-films', parent: 'legalporno', }, { slug: 'mamboperv', name: 'Mambo Perv', url: 'https://www.legalporno.com/studios/mambo-perv', parent: 'legalporno', }, { slug: 'blackinwhite', name: 'Black In White', url: 'https://www.legalporno.com/studios/black-in-white', alias: ['biw'], parent: 'legalporno', }, { slug: 'pissinganalfantasy', name: 'Pissing & Anal Fantasy', url: 'https://www.legalporno.com/studios/pissing-anal-fantasy', alias: ['paf'], parent: 'legalporno', }, { slug: 'siswetanalambassador', name: 'Siswet Anal Ambassador', url: 'https://www.legalporno.com/studios/siswet-anal-ambassador', parent: 'legalporno', }, { slug: 'lizzylaynezentertainment', name: 'Lizzy Laynez Entertainment', url: 'https://www.legalporno.com/studios/lizzy-laynez-entertainment', parent: 'legalporno', }, { slug: 'gallastudio', name: 'Galla Studio', url: 'https://www.legalporno.com/studios/galla-studio', parent: 'legalporno', }, { slug: 'shinaryenspurepleasure', name: 'Shinaryen\'s Pure Pleasure', url: 'https://www.legalporno.com/studios/shinaryen--s-pure-pleasure', parent: 'legalporno', }, { slug: 'analvidsculioneros', name: 'Culioneros', url: 'https://www.legalporno.com/studios/culioneros', parent: 'legalporno', }, { slug: 'hentaied', name: 'Hentaied', url: 'https://www.legalporno.com/studios/hentaied', parent: 'legalporno', }, { slug: 'lvtstudio', name: 'LVT Studio', url: 'https://www.legalporno.com/studios/lvt-studio', parent: 'legalporno', }, { slug: 'analvidsitsgonnahurt', name: 'It\'s Gonna Hurt', url: 'https://www.legalporno.com/studios/its-gonna-hurt', parent: 'legalporno', }, ]; /* eslint-disable max-len */ exports.seed = knex => Promise.resolve() .then(async () => { const networks = await knex('entities') .whereIn('slug', studios.map(studio => studio.parent)); const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {}); const studiosWithNetwork = studios.map(studio => ({ slug: studio.slug, name: studio.name, url: studio.url, type: 'studio', parent_id: networksMap[studio.parent], has_logo: studio.hasLogo || false, })); return upsert('entities', studiosWithNetwork, ['slug', 'type'], knex); });