Skip to content

Commit

Permalink
Merge pull request #427 from Binaergewitter/doc/update-comments-db
Browse files Browse the repository at this point in the history
doc: how to update comments.db
  • Loading branch information
fliiiix authored Jan 19, 2024
2 parents 00a50b4 + 837fd36 commit 48e8e02
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,25 @@ stork --build stork.toml
```

then a github action builds and publishes `bgt.st` to https://search.binaergewitter.de/bgt.st.

# Update comments after rename

If you rename a post you should migrate the old comments.
Since the id for comments is the post title: <https://github.com/Binaergewitter/serious-bg/blob/main/serious/lib/site/views/_isso.erb#L8>.

1. Get the `comments.db`
1. Create a backup
1. Look up the old id and new id in the `threads` table (i use `sqlitebrowser`)
1. Run the update command `UPDATE comments SET tid=$newid WHERE tid=$oldid;`
1. Save file!
1. Upload `comments.db` again


```
scp binaergewitter:/var/lib/isso/comments.db ~/Downloads/comments.db
cp ~/Downloads/comments.db ~/Downloads/comments_bak.db
sqlitebrowser
scp ~/Downloads/comments.db binaergewitter:/var/lib/isso/comments.db
```

0 comments on commit 48e8e02

Please sign in to comment.