Rename lover -> profile

This commit is contained in:
MartinBraquet
2025-09-17 15:51:19 +02:00
parent 593617c0ff
commit ea18781cc6
86 changed files with 601 additions and 746 deletions

View File

@@ -27,7 +27,7 @@ const getNodes = async (pg: SupabaseDirectClient, nodeName: string) => {
console.log(`\nSearching comments for ${nodeName}...`)
const commentQuery = renderSql(
select('id, user_id, on_user_id, content'),
from('lover_comments'),
from('profile_comments'),
where(`jsonb_path_exists(content, '$.**.type ? (@ == "${nodeName}")')`)
)
const comments = await pg.manyOrNone(commentQuery)

View File

@@ -33,7 +33,7 @@ runScript(async ({ pg }) => {
console.log('\nSearching comments for linkPreviews...')
const commentQuery = renderSql(
select('id, content'),
from('lover_comments'),
from('profile_comments'),
where(`jsonb_path_exists(content, '$.**.type ? (@ == "${nodeType}")')`)
)
const comments = await pg.manyOrNone(commentQuery)
@@ -45,7 +45,7 @@ runScript(async ({ pg }) => {
console.log('before', comment.content)
console.log('after', newContent)
await pg.none('update lover_comments set content = $1 where id = $2', [
await pg.none('update profile_comments set content = $1 where id = $2', [
newContent,
comment.id,
])