Template of a custom feed generator service for the Bluesky network in Ruby
1class CreateTables < ActiveRecord::Migration[6.1]
2 def change
3 create_table :posts do |t|
4 t.string :repo, null: false
5 t.datetime :time, null: false
6 t.string :text, null: false
7 t.text :data, null: false
8 t.string :rkey, null: false
9 end
10
11 add_index :posts, :rkey
12
13 create_table :feed_posts do |t|
14 t.integer :feed_id, null: false
15 t.integer :post_id, null: false
16 t.datetime :time, null: false
17 end
18
19 add_index :feed_posts, [:feed_id, :time]
20 end
21end