Don't forget to lycansubscribe
1# This file is auto-generated from the current state of the database. Instead
2# of editing this file, please use the migrations feature of Active Record to
3# incrementally modify your database, and then regenerate this schema definition.
4#
5# This file is the source Rails uses to define your schema when running `bin/rails
6# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7# be faster and is potentially less error prone than running all of your
8# migrations from scratch. Old migrations may fail to apply correctly if those
9# migrations use external dependencies or application code.
10#
11# It's strongly recommended that you check this file into your version control system.
12
13ActiveRecord::Schema[7.2].define(version: 2025_10_27_134657) do
14 # These are extensions that must be enabled in order to support this database
15 enable_extension "plpgsql"
16
17 create_table "import_jobs", force: :cascade do |t|
18 t.integer "user_id", null: false
19 t.index ["user_id"], name: "index_import_jobs_on_user_id", unique: true
20 end
21
22 create_table "imports", force: :cascade do |t|
23 t.integer "user_id", null: false
24 t.string "cursor"
25 t.datetime "started_from"
26 t.datetime "last_completed"
27 t.string "collection", limit: 20, null: false
28 t.datetime "fetched_until"
29 t.index ["user_id", "collection"], name: "index_imports_on_user_id_and_collection", unique: true
30 end
31
32 create_table "likes", force: :cascade do |t|
33 t.integer "actor_id", null: false
34 t.string "rkey", limit: 13, null: false
35 t.datetime "time", null: false
36 t.bigint "post_id"
37 t.string "post_uri"
38 t.integer "queue", limit: 2
39 t.index ["actor_id", "rkey"], name: "index_likes_on_actor_id_and_rkey", unique: true
40 t.index ["actor_id", "time", "id"], name: "index_likes_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
41 end
42
43 create_table "pins", force: :cascade do |t|
44 t.integer "actor_id", null: false
45 t.string "rkey", limit: 13, null: false
46 t.datetime "time", null: false
47 t.text "pin_text", null: false
48 t.bigint "post_id"
49 t.string "post_uri"
50 t.integer "queue", limit: 2
51 t.index ["actor_id", "rkey"], name: "index_pins_on_actor_id_and_rkey", unique: true
52 t.index ["actor_id", "time", "id"], name: "index_pins_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
53 end
54
55 create_table "posts", force: :cascade do |t|
56 t.integer "user_id", null: false
57 t.string "rkey", limit: 13, null: false
58 t.datetime "time", null: false
59 t.text "text", null: false
60 t.text "data", null: false
61 t.index ["user_id", "rkey"], name: "index_posts_on_user_id_and_rkey", unique: true
62 t.index ["user_id", "time", "id"], name: "index_posts_on_user_id_and_time_and_id", order: { time: :desc, id: :desc }
63 end
64
65 create_table "quotes", force: :cascade do |t|
66 t.integer "actor_id", null: false
67 t.string "rkey", limit: 13, null: false
68 t.datetime "time", null: false
69 t.text "quote_text", null: false
70 t.bigint "post_id"
71 t.string "post_uri"
72 t.integer "queue", limit: 2
73 t.index ["actor_id", "rkey"], name: "index_quotes_on_actor_id_and_rkey", unique: true
74 t.index ["actor_id", "time", "id"], name: "index_quotes_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
75 end
76
77 create_table "reposts", force: :cascade do |t|
78 t.integer "actor_id", null: false
79 t.string "rkey", limit: 13, null: false
80 t.datetime "time", null: false
81 t.bigint "post_id"
82 t.string "post_uri"
83 t.integer "queue", limit: 2
84 t.index ["actor_id", "rkey"], name: "index_reposts_on_actor_id_and_rkey", unique: true
85 t.index ["actor_id", "time", "id"], name: "index_reposts_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
86 end
87
88 create_table "subscriptions", force: :cascade do |t|
89 t.string "service", null: false
90 t.bigint "cursor", null: false
91 end
92
93 create_table "users", id: :serial, force: :cascade do |t|
94 t.string "did", limit: 260, null: false
95 t.datetime "registered_at"
96 t.index ["did"], name: "index_users_on_did", unique: true
97 end
98end