Today I removed all code related to bookmarks from Mirage and concluded the migration from all the bookmarks into the notes table. I got the feeling that I was duplicating a lot of code while thinking how I want to approach saving syndicated versions of posts on my site.

I wanted to create a table note_syndications and an schema to go with it. But I would need to do the same thing for bookmarks as well and when comparing the notes and bookmarks schema, there was not much of a difference between the both.

So I decided to completely remove the bookmarks code. Before that, I copied the missing fields from bookmarks, bookmark_of, like_of and repost_of over into the notes schema and added a database migration for them.

I then thought of creating a migration to automatically convert all my bookmarks on the production site into notes, but there were only about 15 bookmarks to convert, so I just did it by hand. Afterwards I wrote a migration to drop all bookmark-related indexes and tables and then deleted all the code.

I hope I made the right decision and don’t create a huge big ball of complexity in the notes schema, but de-duplicating a lot of code sure felt the right thing to do.

35 changed files with 21 additions and 1212 deletions