|
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: 2025_10_10_233458) do |
| 13 | +ActiveRecord::Schema[8.1].define(version: 2026_02_02_203260) do |
14 | 14 | # These are extensions that must be enabled in order to support this database |
15 | 15 | enable_extension "citext" |
16 | 16 | enable_extension "pg_catalog.plpgsql" |
17 | 17 | enable_extension "pgcrypto" |
18 | 18 | enable_extension "uuid-ossp" |
19 | 19 |
|
20 | 20 | create_table "annotations", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
21 | | - t.uuid "change_uuid", null: false |
22 | | - t.bigint "author_id", null: false |
23 | 21 | t.jsonb "annotation", null: false |
| 22 | + t.bigint "author_id", null: false |
| 23 | + t.uuid "change_uuid", null: false |
24 | 24 | t.datetime "created_at", precision: nil, null: false |
25 | 25 | t.datetime "updated_at", precision: nil, null: false |
26 | 26 | t.index ["author_id"], name: "index_annotations_on_author_id" |
27 | 27 | t.index ["change_uuid"], name: "index_annotations_on_change_uuid" |
28 | 28 | end |
29 | 29 |
|
30 | 30 | create_table "changes", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
31 | | - t.uuid "uuid_from", null: false |
32 | | - t.uuid "uuid_to", null: false |
33 | | - t.float "priority" |
34 | | - t.jsonb "current_annotation" |
35 | 31 | t.datetime "created_at", precision: nil, null: false |
36 | | - t.datetime "updated_at", precision: nil, null: false |
| 32 | + t.jsonb "current_annotation" |
| 33 | + t.float "priority" |
37 | 34 | t.float "significance" |
| 35 | + t.datetime "updated_at", precision: nil, null: false |
| 36 | + t.uuid "uuid_from", null: false |
| 37 | + t.uuid "uuid_to", null: false |
38 | 38 | t.index ["uuid_to", "uuid_from"], name: "index_changes_on_uuid_to_and_uuid_from", unique: true |
39 | 39 | t.index ["uuid_to"], name: "index_changes_on_uuid_to" |
40 | 40 | end |
41 | 41 |
|
42 | 42 | create_table "good_job_batches", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
| 43 | + t.integer "callback_priority" |
| 44 | + t.text "callback_queue_name" |
43 | 45 | t.datetime "created_at", null: false |
44 | | - t.datetime "updated_at", null: false |
45 | 46 | t.text "description" |
46 | | - t.jsonb "serialized_properties" |
47 | | - t.text "on_finish" |
48 | | - t.text "on_success" |
49 | | - t.text "on_discard" |
50 | | - t.text "callback_queue_name" |
51 | | - t.integer "callback_priority" |
52 | | - t.datetime "enqueued_at" |
53 | 47 | t.datetime "discarded_at" |
| 48 | + t.datetime "enqueued_at" |
54 | 49 | t.datetime "finished_at" |
55 | 50 | t.datetime "jobs_finished_at" |
| 51 | + t.text "on_discard" |
| 52 | + t.text "on_finish" |
| 53 | + t.text "on_success" |
| 54 | + t.jsonb "serialized_properties" |
| 55 | + t.datetime "updated_at", null: false |
56 | 56 | end |
57 | 57 |
|
58 | 58 | create_table "good_job_executions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
59 | | - t.datetime "created_at", null: false |
60 | | - t.datetime "updated_at", null: false |
61 | 59 | t.uuid "active_job_id", null: false |
62 | | - t.text "job_class" |
63 | | - t.text "queue_name" |
64 | | - t.jsonb "serialized_params" |
65 | | - t.datetime "scheduled_at" |
66 | | - t.datetime "finished_at" |
| 60 | + t.datetime "created_at", null: false |
| 61 | + t.interval "duration" |
67 | 62 | t.text "error" |
68 | | - t.integer "error_event", limit: 2 |
69 | 63 | t.text "error_backtrace", array: true |
| 64 | + t.integer "error_event", limit: 2 |
| 65 | + t.datetime "finished_at" |
| 66 | + t.text "job_class" |
70 | 67 | t.uuid "process_id" |
71 | | - t.interval "duration" |
| 68 | + t.text "queue_name" |
| 69 | + t.datetime "scheduled_at" |
| 70 | + t.jsonb "serialized_params" |
| 71 | + t.datetime "updated_at", null: false |
72 | 72 | t.index ["active_job_id", "created_at"], name: "index_good_job_executions_on_active_job_id_and_created_at" |
73 | 73 | t.index ["process_id", "created_at"], name: "index_good_job_executions_on_process_id_and_created_at" |
74 | 74 | end |
75 | 75 |
|
76 | 76 | create_table "good_job_processes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
77 | 77 | t.datetime "created_at", null: false |
78 | | - t.datetime "updated_at", null: false |
79 | | - t.jsonb "state" |
80 | 78 | t.integer "lock_type", limit: 2 |
| 79 | + t.jsonb "state" |
| 80 | + t.datetime "updated_at", null: false |
81 | 81 | end |
82 | 82 |
|
83 | 83 | create_table "good_job_settings", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
84 | 84 | t.datetime "created_at", null: false |
85 | | - t.datetime "updated_at", null: false |
86 | 85 | t.text "key" |
| 86 | + t.datetime "updated_at", null: false |
87 | 87 | t.jsonb "value" |
88 | 88 | t.index ["key"], name: "index_good_job_settings_on_key", unique: true |
89 | 89 | end |
90 | 90 |
|
91 | 91 | create_table "good_jobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
92 | | - t.text "queue_name" |
93 | | - t.integer "priority" |
94 | | - t.jsonb "serialized_params" |
95 | | - t.datetime "scheduled_at" |
96 | | - t.datetime "performed_at" |
97 | | - t.datetime "finished_at" |
98 | | - t.text "error" |
99 | | - t.datetime "created_at", null: false |
100 | | - t.datetime "updated_at", null: false |
101 | 92 | t.uuid "active_job_id" |
| 93 | + t.uuid "batch_callback_id" |
| 94 | + t.uuid "batch_id" |
102 | 95 | t.text "concurrency_key" |
103 | | - t.text "cron_key" |
104 | | - t.uuid "retried_good_job_id" |
| 96 | + t.datetime "created_at", null: false |
105 | 97 | t.datetime "cron_at" |
106 | | - t.uuid "batch_id" |
107 | | - t.uuid "batch_callback_id" |
108 | | - t.boolean "is_discrete" |
| 98 | + t.text "cron_key" |
| 99 | + t.text "error" |
| 100 | + t.integer "error_event", limit: 2 |
109 | 101 | t.integer "executions_count" |
| 102 | + t.datetime "finished_at" |
| 103 | + t.boolean "is_discrete" |
110 | 104 | t.text "job_class" |
111 | | - t.integer "error_event", limit: 2 |
112 | 105 | t.text "labels", array: true |
113 | | - t.uuid "locked_by_id" |
114 | 106 | t.datetime "locked_at" |
| 107 | + t.uuid "locked_by_id" |
| 108 | + t.datetime "performed_at" |
| 109 | + t.integer "priority" |
| 110 | + t.text "queue_name" |
| 111 | + t.uuid "retried_good_job_id" |
| 112 | + t.datetime "scheduled_at" |
| 113 | + t.jsonb "serialized_params" |
| 114 | + t.datetime "updated_at", null: false |
115 | 115 | t.index ["active_job_id", "created_at"], name: "index_good_jobs_on_active_job_id_and_created_at" |
116 | 116 | t.index ["batch_callback_id"], name: "index_good_jobs_on_batch_callback_id", where: "(batch_callback_id IS NOT NULL)" |
117 | 117 | t.index ["batch_id"], name: "index_good_jobs_on_batch_id", where: "(batch_id IS NOT NULL)" |
118 | 118 | t.index ["concurrency_key", "created_at"], name: "index_good_jobs_on_concurrency_key_and_created_at" |
119 | 119 | t.index ["concurrency_key"], name: "index_good_jobs_on_concurrency_key_when_unfinished", where: "(finished_at IS NULL)" |
120 | 120 | t.index ["cron_key", "created_at"], name: "index_good_jobs_on_cron_key_and_created_at_cond", where: "(cron_key IS NOT NULL)" |
121 | 121 | t.index ["cron_key", "cron_at"], name: "index_good_jobs_on_cron_key_and_cron_at_cond", unique: true, where: "(cron_key IS NOT NULL)" |
122 | | - t.index ["finished_at"], name: "index_good_jobs_jobs_on_finished_at", where: "((retried_good_job_id IS NULL) AND (finished_at IS NOT NULL))" |
| 122 | + t.index ["finished_at"], name: "index_good_jobs_jobs_on_finished_at_only", where: "(finished_at IS NOT NULL)" |
123 | 123 | t.index ["job_class"], name: "index_good_jobs_on_job_class" |
124 | 124 | t.index ["labels"], name: "index_good_jobs_on_labels", where: "(labels IS NOT NULL)", using: :gin |
125 | 125 | t.index ["locked_by_id"], name: "index_good_jobs_on_locked_by_id", where: "(locked_by_id IS NOT NULL)" |
|
131 | 131 | end |
132 | 132 |
|
133 | 133 | create_table "imports", force: :cascade do |t| |
134 | | - t.bigint "user_id" |
135 | | - t.integer "status", default: 0, null: false |
| 134 | + t.boolean "create_pages", default: true, null: false |
| 135 | + t.datetime "created_at", precision: nil, null: false |
136 | 136 | t.string "file" |
137 | 137 | t.jsonb "processing_errors" |
138 | | - t.datetime "created_at", precision: nil, null: false |
139 | | - t.datetime "updated_at", precision: nil, null: false |
140 | | - t.integer "update_behavior", default: 0, null: false |
141 | | - t.boolean "create_pages", default: true, null: false |
142 | 138 | t.jsonb "processing_warnings" |
143 | 139 | t.boolean "skip_unchanged_versions", default: false, null: false |
| 140 | + t.integer "status", default: 0, null: false |
| 141 | + t.integer "update_behavior", default: 0, null: false |
| 142 | + t.datetime "updated_at", precision: nil, null: false |
| 143 | + t.bigint "user_id" |
144 | 144 | t.index ["user_id"], name: "index_imports_on_user_id" |
145 | 145 | end |
146 | 146 |
|
147 | 147 | create_table "invitations", force: :cascade do |t| |
148 | | - t.bigint "issuer_id" |
149 | | - t.bigint "redeemer_id" |
150 | 148 | t.string "code" |
| 149 | + t.datetime "created_at", precision: nil, null: false |
151 | 150 | t.string "email" |
152 | 151 | t.datetime "expires_on", precision: nil |
153 | | - t.datetime "created_at", precision: nil, null: false |
| 152 | + t.bigint "issuer_id" |
| 153 | + t.bigint "redeemer_id" |
154 | 154 | t.datetime "updated_at", precision: nil, null: false |
155 | 155 | t.index ["code"], name: "index_invitations_on_code" |
156 | 156 | t.index ["issuer_id"], name: "index_invitations_on_issuer_id" |
157 | 157 | t.index ["redeemer_id"], name: "index_invitations_on_redeemer_id" |
158 | 158 | end |
159 | 159 |
|
160 | 160 | create_table "maintainers", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
| 161 | + t.datetime "created_at", precision: nil, null: false |
161 | 162 | t.citext "name", null: false |
162 | 163 | t.uuid "parent_uuid" |
163 | | - t.datetime "created_at", precision: nil, null: false |
164 | 164 | t.datetime "updated_at", precision: nil, null: false |
165 | 165 | t.index ["name"], name: "index_maintainers_on_name", unique: true |
166 | 166 | end |
167 | 167 |
|
168 | 168 | create_table "maintainerships", id: false, force: :cascade do |t| |
| 169 | + t.datetime "created_at", precision: nil, null: false |
169 | 170 | t.uuid "maintainer_uuid", null: false |
170 | 171 | t.uuid "page_uuid", null: false |
171 | | - t.datetime "created_at", precision: nil, null: false |
172 | 172 | t.index ["maintainer_uuid", "page_uuid"], name: "index_maintainerships_on_maintainer_uuid_and_page_uuid", unique: true |
173 | 173 | t.index ["maintainer_uuid"], name: "index_maintainerships_on_maintainer_uuid" |
174 | 174 | t.index ["page_uuid"], name: "index_maintainerships_on_page_uuid" |
175 | 175 | end |
176 | 176 |
|
177 | 177 | create_table "merged_pages", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
178 | | - t.uuid "target_uuid", null: false |
179 | 178 | t.jsonb "audit_data" |
| 179 | + t.uuid "target_uuid", null: false |
180 | 180 | t.index ["target_uuid"], name: "index_merged_pages_on_target_uuid" |
181 | 181 | end |
182 | 182 |
|
183 | 183 | create_table "page_urls", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
184 | | - t.uuid "page_uuid", null: false |
185 | | - t.string "url", null: false |
186 | | - t.string "url_key", null: false |
| 184 | + t.datetime "created_at", null: false |
187 | 185 | t.datetime "from_time", precision: nil, default: -::Float::INFINITY, null: false |
188 | | - t.datetime "to_time", precision: nil, default: ::Float::INFINITY, null: false |
189 | 186 | t.string "notes" |
190 | | - t.datetime "created_at", null: false |
| 187 | + t.uuid "page_uuid", null: false |
| 188 | + t.datetime "to_time", precision: nil, default: ::Float::INFINITY, null: false |
191 | 189 | t.datetime "updated_at", null: false |
| 190 | + t.string "url", null: false |
| 191 | + t.string "url_key", null: false |
192 | 192 | t.index ["page_uuid", "url", "from_time", "to_time"], name: "index_page_urls_on_page_uuid_and_url_and_from_time_and_to_time", unique: true |
193 | 193 | t.index ["url"], name: "index_page_urls_on_url" |
194 | 194 | t.index ["url_key"], name: "index_page_urls_on_url_key" |
195 | 195 | end |
196 | 196 |
|
197 | 197 | create_table "pages", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
198 | | - t.string "url", null: false |
199 | | - t.string "title" |
| 198 | + t.boolean "active", default: true |
200 | 199 | t.datetime "created_at", precision: nil, null: false |
| 200 | + t.integer "status" |
| 201 | + t.string "title" |
201 | 202 | t.datetime "updated_at", precision: nil, null: false |
| 203 | + t.string "url", null: false |
202 | 204 | t.string "url_key" |
203 | | - t.boolean "active", default: true |
204 | | - t.integer "status" |
205 | 205 | t.index ["url"], name: "index_pages_on_url" |
206 | 206 | t.index ["url_key"], name: "index_pages_on_url_key" |
207 | 207 | end |
208 | 208 |
|
209 | 209 | create_table "taggings", id: false, force: :cascade do |t| |
210 | | - t.uuid "taggable_uuid", null: false |
211 | | - t.string "taggable_type" |
212 | | - t.uuid "tag_uuid", null: false |
213 | 210 | t.datetime "created_at", precision: nil, null: false |
| 211 | + t.uuid "tag_uuid", null: false |
| 212 | + t.string "taggable_type" |
| 213 | + t.uuid "taggable_uuid", null: false |
214 | 214 | t.index ["tag_uuid"], name: "index_taggings_on_tag_uuid" |
215 | 215 | t.index ["taggable_uuid", "tag_uuid"], name: "index_taggings_on_taggable_uuid_and_tag_uuid", unique: true |
216 | 216 | t.index ["taggable_uuid"], name: "index_taggings_on_taggable_uuid" |
217 | 217 | end |
218 | 218 |
|
219 | 219 | create_table "tags", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
220 | | - t.citext "name", null: false |
221 | 220 | t.datetime "created_at", precision: nil, null: false |
| 221 | + t.citext "name", null: false |
222 | 222 | t.datetime "updated_at", precision: nil, null: false |
223 | 223 | t.index ["name"], name: "index_tags_on_name", unique: true |
224 | 224 | end |
225 | 225 |
|
226 | 226 | create_table "users", force: :cascade do |t| |
| 227 | + t.datetime "confirmation_sent_at", precision: nil |
| 228 | + t.string "confirmation_token" |
| 229 | + t.datetime "confirmed_at", precision: nil |
| 230 | + t.datetime "created_at", precision: nil, null: false |
| 231 | + t.datetime "current_sign_in_at", precision: nil |
| 232 | + t.inet "current_sign_in_ip" |
227 | 233 | t.string "email", default: "", null: false |
228 | 234 | t.string "encrypted_password", default: "", null: false |
229 | | - t.string "reset_password_token" |
230 | | - t.datetime "reset_password_sent_at", precision: nil |
231 | | - t.datetime "remember_created_at", precision: nil |
232 | | - t.integer "sign_in_count", default: 0, null: false |
233 | | - t.datetime "current_sign_in_at", precision: nil |
234 | 235 | t.datetime "last_sign_in_at", precision: nil |
235 | | - t.inet "current_sign_in_ip" |
236 | 236 | t.inet "last_sign_in_ip" |
237 | | - t.string "confirmation_token" |
238 | | - t.datetime "confirmed_at", precision: nil |
239 | | - t.datetime "confirmation_sent_at", precision: nil |
| 237 | + t.string "permissions", default: [], array: true |
| 238 | + t.datetime "remember_created_at", precision: nil |
| 239 | + t.datetime "reset_password_sent_at", precision: nil |
| 240 | + t.string "reset_password_token" |
| 241 | + t.integer "sign_in_count", default: 0, null: false |
240 | 242 | t.string "unconfirmed_email" |
241 | | - t.datetime "created_at", precision: nil, null: false |
242 | 243 | t.datetime "updated_at", precision: nil, null: false |
243 | | - t.string "permissions", default: [], array: true |
244 | 244 | t.index ["email"], name: "index_users_on_email", unique: true |
245 | 245 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true |
246 | 246 | end |
247 | 247 |
|
248 | 248 | create_table "versions", primary_key: "uuid", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
249 | | - t.uuid "page_uuid" |
250 | | - t.datetime "capture_time", precision: nil, null: false |
251 | | - t.string "body_url" |
252 | 249 | t.string "body_hash" |
253 | | - t.string "source_type" |
254 | | - t.jsonb "source_metadata" |
| 250 | + t.string "body_url" |
| 251 | + t.datetime "capture_time", precision: nil, null: false |
| 252 | + t.integer "content_length" |
255 | 253 | t.datetime "created_at", precision: nil, null: false |
256 | | - t.datetime "updated_at", precision: nil, null: false |
257 | | - t.string "title" |
258 | | - t.string "url" |
259 | 254 | t.boolean "different", default: true |
260 | | - t.integer "status" |
261 | | - t.integer "content_length" |
262 | | - t.string "media_type" |
263 | 255 | t.jsonb "headers" |
| 256 | + t.string "media_type" |
264 | 257 | t.string "network_error" |
| 258 | + t.uuid "page_uuid" |
| 259 | + t.jsonb "source_metadata" |
| 260 | + t.string "source_type" |
| 261 | + t.integer "status" |
| 262 | + t.string "title" |
| 263 | + t.datetime "updated_at", precision: nil, null: false |
| 264 | + t.string "url" |
265 | 265 | t.index ["body_hash"], name: "index_versions_on_body_hash" |
266 | 266 | t.index ["capture_time", "uuid"], name: "index_versions_on_capture_time_and_uuid" |
267 | 267 | t.index ["created_at", "uuid"], name: "index_versions_on_created_at_and_uuid" |
|
0 commit comments