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_09_23_180153) 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.index ["user_id", "collection"], name: "index_imports_on_user_id_and_collection", unique: true
29 end
30
31 create_table "likes", force: :cascade do |t|
32 t.integer "actor_id", null: false
33 t.string "rkey", limit: 13, null: false
34 t.datetime "time", null: false
35 t.bigint "post_id"
36 t.string "post_uri"
37 t.integer "queue", limit: 2
38 t.index ["actor_id", "rkey"], name: "index_likes_on_actor_id_and_rkey", unique: true
39 t.index ["actor_id", "time", "id"], name: "index_likes_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
40 end
41
42 create_table "pins", force: :cascade do |t|
43 t.integer "actor_id", null: false
44 t.string "rkey", limit: 13, null: false
45 t.datetime "time", null: false
46 t.text "pin_text", null: false
47 t.bigint "post_id"
48 t.string "post_uri"
49 t.integer "queue", limit: 2
50 t.index ["actor_id", "rkey"], name: "index_pins_on_actor_id_and_rkey", unique: true
51 t.index ["actor_id", "time", "id"], name: "index_pins_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
52 end
53
54 create_table "posts", force: :cascade do |t|
55 t.integer "user_id", null: false
56 t.string "rkey", limit: 13, null: false
57 t.datetime "time", null: false
58 t.text "text", null: false
59 t.text "data", null: false
60 t.index ["user_id", "rkey"], name: "index_posts_on_user_id_and_rkey", unique: true
61 t.index ["user_id", "time", "id"], name: "index_posts_on_user_id_and_time_and_id", order: { time: :desc, id: :desc }
62 end
63
64 create_table "quotes", force: :cascade do |t|
65 t.integer "actor_id", null: false
66 t.string "rkey", limit: 13, null: false
67 t.datetime "time", null: false
68 t.text "quote_text", null: false
69 t.bigint "post_id"
70 t.string "post_uri"
71 t.integer "queue", limit: 2
72 t.index ["actor_id", "rkey"], name: "index_quotes_on_actor_id_and_rkey", unique: true
73 t.index ["actor_id", "time", "id"], name: "index_quotes_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
74 end
75
76 create_table "reposts", force: :cascade do |t|
77 t.integer "actor_id", null: false
78 t.string "rkey", limit: 13, null: false
79 t.datetime "time", null: false
80 t.bigint "post_id"
81 t.string "post_uri"
82 t.integer "queue", limit: 2
83 t.index ["actor_id", "rkey"], name: "index_reposts_on_actor_id_and_rkey", unique: true
84 t.index ["actor_id", "time", "id"], name: "index_reposts_on_actor_id_and_time_and_id", order: { time: :desc, id: :desc }
85 end
86
87 create_table "subscriptions", force: :cascade do |t|
88 t.string "service", null: false
89 t.bigint "cursor", null: false
90 end
91
92 create_table "users", id: :serial, force: :cascade do |t|
93 t.string "did", limit: 260, null: false
94 t.datetime "registered_at"
95 t.index ["did"], name: "index_users_on_did", unique: true
96 end
97end