Added rename to tag seed.
This commit is contained in:
+45
-22
@@ -114,6 +114,7 @@ const tags = [
|
|||||||
{
|
{
|
||||||
name: 'anal',
|
name: 'anal',
|
||||||
slug: 'anal',
|
slug: 'anal',
|
||||||
|
rename: 'ass-fucking',
|
||||||
description: 'Getting your asshole fucked. Generally considered naughtier, you may or may not find it a pleasurable alternative to vaginal sex.',
|
description: 'Getting your asshole fucked. Generally considered naughtier, you may or may not find it a pleasurable alternative to vaginal sex.',
|
||||||
group: 'penetration',
|
group: 'penetration',
|
||||||
},
|
},
|
||||||
@@ -554,8 +555,9 @@ const tags = [
|
|||||||
slug: 'electric-shock',
|
slug: 'electric-shock',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'enhanced boobs',
|
name: 'fake tits',
|
||||||
slug: 'enhanced-boobs',
|
slug: 'fake-tits',
|
||||||
|
rename: 'enhanced-boobs',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'enhanced butt',
|
name: 'enhanced butt',
|
||||||
@@ -868,8 +870,9 @@ const tags = [
|
|||||||
group: 'position',
|
group: 'position',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'natural boobs',
|
name: 'natural tits',
|
||||||
slug: 'natural-boobs',
|
slug: 'natural-tits',
|
||||||
|
rename: 'natural-boobs',
|
||||||
group: 'body',
|
group: 'body',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1651,15 +1654,17 @@ const aliases = [
|
|||||||
name: 'big butts',
|
name: 'big butts',
|
||||||
for: 'big-butt',
|
for: 'big-butt',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'natural boobs',
|
||||||
|
for: 'natural-tits',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'big natural tits',
|
name: 'big natural tits',
|
||||||
for: 'big-boobs',
|
for: 'big-boobs',
|
||||||
implies: ['natural-boobs'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'big natural boobs',
|
name: 'big natural boobs',
|
||||||
for: 'big-boobs',
|
for: 'big-boobs',
|
||||||
implies: ['natural-boobs'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'big tits',
|
name: 'big tits',
|
||||||
@@ -1739,12 +1744,17 @@ const aliases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'fake boobs',
|
name: 'fake boobs',
|
||||||
for: 'enhanced-boobs',
|
for: 'fake-tits',
|
||||||
|
secondary: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'enhanced boobs',
|
||||||
|
for: 'fake-tits',
|
||||||
secondary: true,
|
secondary: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'implants',
|
name: 'implants',
|
||||||
for: 'enhanced-boobs',
|
for: 'fake-tits',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'boob job',
|
name: 'boob job',
|
||||||
@@ -1752,7 +1762,7 @@ const aliases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'boobjob',
|
name: 'boobjob',
|
||||||
for: 'enhanced-boobs',
|
for: 'fake-tits',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'brown hair',
|
name: 'brown hair',
|
||||||
@@ -2017,11 +2027,11 @@ const aliases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'enhanced',
|
name: 'enhanced',
|
||||||
for: 'enhanced-boobs',
|
for: 'fake-tits',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'enhanced tits',
|
name: 'enhanced tits',
|
||||||
for: 'enhanced-boobs',
|
for: 'fake-tits',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'fake butt',
|
name: 'fake butt',
|
||||||
@@ -2064,11 +2074,6 @@ const aliases = [
|
|||||||
name: 'facial - multiple',
|
name: 'facial - multiple',
|
||||||
for: 'facial',
|
for: 'facial',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'fake tits',
|
|
||||||
for: 'enhanced-boobs',
|
|
||||||
secondary: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'feet sex',
|
name: 'feet sex',
|
||||||
for: 'foot-sex',
|
for: 'foot-sex',
|
||||||
@@ -2218,11 +2223,7 @@ const aliases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'natural',
|
name: 'natural',
|
||||||
for: 'natural-boobs',
|
for: 'natural-tits',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'natural tits',
|
|
||||||
for: 'natural-boobs',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'natural butt',
|
name: 'natural butt',
|
||||||
@@ -3109,7 +3110,7 @@ const aliases = [
|
|||||||
const priorities = [ // higher index is higher priority
|
const priorities = [ // higher index is higher priority
|
||||||
['blonde', 'brunette', 'black-hair', 'redhead'],
|
['blonde', 'brunette', 'black-hair', 'redhead'],
|
||||||
['asian', 'black', 'latina', 'white', 'interracial'],
|
['asian', 'black', 'latina', 'white', 'interracial'],
|
||||||
['enhanced-boobs', 'natural-boobs'],
|
['fake-tits', 'natural-tits'],
|
||||||
['bts'],
|
['bts'],
|
||||||
['blowjob', 'deepthroat', 'oil'],
|
['blowjob', 'deepthroat', 'oil'],
|
||||||
['toys', 'toy-anal', 'toy-dp', 'piss-drinking'],
|
['toys', 'toy-anal', 'toy-dp', 'piss-drinking'],
|
||||||
@@ -3135,6 +3136,28 @@ const priorities = [ // higher index is higher priority
|
|||||||
exports.seed = (knex) => Promise.resolve()
|
exports.seed = (knex) => Promise.resolve()
|
||||||
.then(async () => upsert('tags_groups', groups, 'slug', knex))
|
.then(async () => upsert('tags_groups', groups, 'slug', knex))
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
await Promise.all(tags.map((async (tag) => {
|
||||||
|
if (tag.rename) {
|
||||||
|
await knex('tags')
|
||||||
|
.where('name', tag.name)
|
||||||
|
.whereNotNull('alias_for')
|
||||||
|
.delete();
|
||||||
|
|
||||||
|
await knex('tags')
|
||||||
|
.where('slug', tag.rename)
|
||||||
|
.update({
|
||||||
|
name: tag.name,
|
||||||
|
slug: tag.slug,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag.delete) {
|
||||||
|
await knex('tags')
|
||||||
|
.where('slug', tag.rename)
|
||||||
|
.delete();
|
||||||
|
}
|
||||||
|
})));
|
||||||
|
|
||||||
const groupEntries = await knex('tags_groups').select('*');
|
const groupEntries = await knex('tags_groups').select('*');
|
||||||
const groupsMap = groupEntries.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
const groupsMap = groupEntries.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user