chore: remove old filters, hardcoded types, old post status from view
This commit is contained in:
parent
ffea333d55
commit
76a172bb74
15 changed files with 15 additions and 48 deletions
|
@ -2,7 +2,6 @@ CREATE OR REPLACE VIEW optimized_all_activity AS
|
|||
WITH feed_data AS (
|
||||
SELECT
|
||||
p.date AS content_date,
|
||||
'post' AS content_type,
|
||||
p.title,
|
||||
p.description,
|
||||
CONCAT('https://coryd.dev', p.url) AS url,
|
||||
|
@ -21,7 +20,6 @@ WITH feed_data AS (
|
|||
|
||||
SELECT
|
||||
l.date AS content_date,
|
||||
'link' AS content_type,
|
||||
l.title,
|
||||
l.description,
|
||||
l.link AS url,
|
||||
|
@ -40,7 +38,6 @@ WITH feed_data AS (
|
|||
|
||||
SELECT
|
||||
b.date_finished AS content_date,
|
||||
'book' AS content_type,
|
||||
b.title,
|
||||
b.description,
|
||||
CONCAT('https://coryd.dev', b.url) AS url,
|
||||
|
@ -64,7 +61,6 @@ WITH feed_data AS (
|
|||
|
||||
SELECT
|
||||
m.last_watched AS content_date,
|
||||
'movie' AS content_type,
|
||||
m.title,
|
||||
m.description,
|
||||
CONCAT('https://coryd.dev', m.url) AS url,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
CREATE OR REPLACE VIEW optimized_search_index AS
|
||||
WITH search_data AS (
|
||||
SELECT
|
||||
'post' AS content_type,
|
||||
CONCAT('📝 ', p.title) AS title,
|
||||
CONCAT('https://coryd.dev', p.url) AS url,
|
||||
p.tags,
|
||||
|
@ -12,7 +11,6 @@ WITH search_data AS (
|
|||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'link' AS content_type,
|
||||
CONCAT('🔗 ', l.title, ' via ', l.name) AS title,
|
||||
l.link AS url,
|
||||
l.tags,
|
||||
|
@ -23,7 +21,6 @@ WITH search_data AS (
|
|||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'book' AS content_type,
|
||||
CASE
|
||||
WHEN b.rating IS NOT NULL THEN CONCAT('📖 ', b.title, ' (', b.rating, ')')
|
||||
ELSE CONCAT('📖 ', b.title)
|
||||
|
@ -38,7 +35,6 @@ WITH search_data AS (
|
|||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'movie' AS content_type,
|
||||
CASE
|
||||
WHEN m.rating IS NOT NULL THEN CONCAT('🎥 ', m.title, ' (', m.rating, ')')
|
||||
ELSE CONCAT('🎥 ', m.title)
|
||||
|
@ -53,7 +49,6 @@ WITH search_data AS (
|
|||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'artist' AS content_type,
|
||||
CONCAT('🎧 ', ar.name, ' - ', ar.genre_name) AS title,
|
||||
CONCAT('https://coryd.dev', ar.url) AS url,
|
||||
ARRAY[ar.genre_name] AS tags,
|
||||
|
@ -64,7 +59,6 @@ WITH search_data AS (
|
|||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'genre' AS content_type,
|
||||
CONCAT('🎵 ', g.name) AS title,
|
||||
CONCAT('https://coryd.dev', g.url) AS url,
|
||||
NULL AS tags,
|
||||
|
|
|
@ -2,7 +2,6 @@ CREATE OR REPLACE VIEW optimized_sitemap AS
|
|||
WITH sitemap_data AS (
|
||||
SELECT
|
||||
p.date AS content_date,
|
||||
'post' AS content_type,
|
||||
p.title,
|
||||
CONCAT('https://coryd.dev', p.url) AS url
|
||||
FROM optimized_posts p
|
||||
|
@ -11,7 +10,6 @@ WITH sitemap_data AS (
|
|||
|
||||
SELECT
|
||||
b.date_finished AS content_date,
|
||||
'book' AS content_type,
|
||||
b.title,
|
||||
CONCAT('https://coryd.dev', b.url) AS url
|
||||
FROM optimized_books b
|
||||
|
@ -21,7 +19,6 @@ WITH sitemap_data AS (
|
|||
|
||||
SELECT
|
||||
m.last_watched AS content_date,
|
||||
'movie' AS content_type,
|
||||
m.title,
|
||||
CONCAT('https://coryd.dev', m.url) AS url
|
||||
FROM optimized_movies m
|
||||
|
@ -31,7 +28,6 @@ WITH sitemap_data AS (
|
|||
|
||||
SELECT
|
||||
NULL AS content_date,
|
||||
'artist' AS content_type,
|
||||
ar.name AS title,
|
||||
CONCAT('https://coryd.dev', ar.url) AS url
|
||||
FROM optimized_artists ar
|
||||
|
@ -40,7 +36,6 @@ WITH sitemap_data AS (
|
|||
|
||||
SELECT
|
||||
NULL AS content_date,
|
||||
'genre' AS content_type,
|
||||
g.name AS title,
|
||||
CONCAT('https://coryd.dev', g.url) AS url
|
||||
FROM optimized_genres g
|
||||
|
|
|
@ -2,7 +2,6 @@ CREATE OR REPLACE VIEW optimized_syndication AS
|
|||
WITH syndication_data AS (
|
||||
SELECT
|
||||
p.date AS content_date,
|
||||
'post' AS content_type,
|
||||
p.title,
|
||||
p.description,
|
||||
CONCAT('https://coryd.dev', p.url) AS url,
|
||||
|
@ -24,7 +23,6 @@ WITH syndication_data AS (
|
|||
|
||||
SELECT
|
||||
l.date AS content_date,
|
||||
'link' AS content_type,
|
||||
l.title,
|
||||
l.description,
|
||||
l.link AS url,
|
||||
|
@ -52,7 +50,6 @@ WITH syndication_data AS (
|
|||
|
||||
SELECT
|
||||
b.date_finished AS content_date,
|
||||
'book' AS content_type,
|
||||
b.title,
|
||||
b.description,
|
||||
CONCAT('https://coryd.dev', b.url) AS url,
|
||||
|
@ -77,7 +74,6 @@ WITH syndication_data AS (
|
|||
|
||||
SELECT
|
||||
m.last_watched AS content_date,
|
||||
'movie' AS content_type,
|
||||
m.title,
|
||||
m.description,
|
||||
CONCAT('https://coryd.dev', m.url) AS url,
|
||||
|
|
Reference in a new issue