Template of a custom feed generator service for the Bluesky network in Ruby

added index on repo+time to posts

to allow deleting posts from an account

+7
db/migrate/20240604130301_add_posts_repo_index.rb
··· 1 + require_relative '../../app/models/post' 2 + 3 + class AddPostsRepoIndex < ActiveRecord::Migration[6.1] 4 + def change 5 + add_index :posts, [:repo, :time] 6 + end 7 + end
+2 -1
db/schema.rb
··· 10 10 # 11 11 # It's strongly recommended that you check this file into your version control system. 12 12 13 - ActiveRecord::Schema[8.0].define(version: 2023_08_02_222353) do 13 + ActiveRecord::Schema[8.0].define(version: 2024_06_04_130301) do 14 14 create_table "feed_posts", force: :cascade do |t| 15 15 t.integer "feed_id", null: false 16 16 t.integer "post_id", null: false ··· 24 24 t.string "text", null: false 25 25 t.text "data", null: false 26 26 t.string "rkey", null: false 27 + t.index ["repo", "time"], name: "index_posts_on_repo_and_time" 27 28 t.index ["rkey"], name: "index_posts_on_rkey" 28 29 t.index ["time"], name: "index_posts_on_time" 29 30 end