Compare commits
No commits in common. "b6559331eb2c22148b358b40171a8893a2e5b4ef" and "156d1f2fbd2211ec9d38010a23d47cded4e2fa62" have entirely different histories.
b6559331eb
...
156d1f2fbd
|
@ -431,9 +431,22 @@ const releasesFragment = `
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isShowcased: {
|
or: [
|
||||||
equalTo: true
|
{
|
||||||
}
|
entity: {
|
||||||
|
showcased: {
|
||||||
|
equalTo: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
studio: {
|
||||||
|
showcased: {
|
||||||
|
equalTo: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
first: $limit,
|
first: $limit,
|
||||||
offset: $offset,
|
offset: $offset,
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
exports.up = async (knex) => knex.raw(`
|
|
||||||
/* CREATE FUNCTION releases_is_showcased(release releases) RETURNS BOOLEAN AS $$
|
|
||||||
SELECT COALESCE(entities.showcased, false) OR COALESCE(studios.showcased, false) FROM releases
|
|
||||||
LEFT JOIN entities ON entities.id = releases.entity_id
|
|
||||||
LEFT JOIN entities AS studios ON studios.id = releases.studio_id
|
|
||||||
WHERE releases.id = release.id
|
|
||||||
$$ LANGUAGE SQL STABLE; */
|
|
||||||
|
|
||||||
CREATE FUNCTION releases_is_showcased(release releases) RETURNS BOOLEAN AS $$
|
|
||||||
SELECT COALESCE((SELECT showcased FROM entities WHERE entities.id = releases.entity_id), false)
|
|
||||||
OR COALESCE((SELECT showcased FROM entities WHERE entities.id = releases.studio_id), false) FROM releases
|
|
||||||
WHERE releases.id = release.id
|
|
||||||
$$ LANGUAGE SQL STABLE;
|
|
||||||
`);
|
|
||||||
|
|
||||||
exports.down = async (knex) => knex.raw(`
|
|
||||||
DROP FUNCTION IF EXISTS releases_is_showcased;
|
|
||||||
`);
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.225.5",
|
"version": "1.225.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.225.5",
|
"version": "1.225.4",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.225.5",
|
"version": "1.225.4",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue