feature/share-libs
rb 745 lines 28.1 KB
Raw
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
13 ActiveRecord::Schema.define(version: 2024_02_05_114851) do
14
15 # These are extensions that must be enabled in order to support this database
16 enable_extension "plpgsql"
17
18 create_table "active_admin_comments", force: :cascade do |t|
19 t.string "namespace"
20 t.text "body"
21 t.string "resource_type"
22 t.bigint "resource_id"
23 t.string "author_type"
24 t.bigint "author_id"
25 t.datetime "created_at", null: false
26 t.datetime "updated_at", null: false
27 t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id"
28 t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
29 t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id"
30 end
31
32 create_table "active_storage_attachments", force: :cascade do |t|
33 t.string "name", null: false
34 t.string "record_type", null: false
35 t.bigint "record_id", null: false
36 t.bigint "blob_id", null: false
37 t.datetime "created_at", null: false
38 t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
39 t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
40 end
41
42 create_table "active_storage_blobs", force: :cascade do |t|
43 t.string "key", null: false
44 t.string "filename", null: false
45 t.string "content_type"
46 t.text "metadata"
47 t.bigint "byte_size", null: false
48 t.string "checksum", null: false
49 t.datetime "created_at", null: false
50 t.string "service_name", null: false
51 t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
52 end
53
54 create_table "active_storage_variant_records", force: :cascade do |t|
55 t.bigint "blob_id", null: false
56 t.string "variation_digest", null: false
57 t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
58 end
59
60 create_table "album_artists", force: :cascade do |t|
61 t.boolean "primary"
62 t.bigint "album_id"
63 t.bigint "artist_id"
64 t.datetime "created_at", null: false
65 t.datetime "updated_at", null: false
66 t.index ["album_id"], name: "index_album_artists_on_album_id"
67 t.index ["artist_id"], name: "index_album_artists_on_artist_id"
68 end
69
70 create_table "album_providers", force: :cascade do |t|
71 t.bigint "user_id"
72 t.bigint "album_id"
73 t.string "provider_id"
74 t.integer "provider_type"
75 t.string "name"
76 t.datetime "created_at", precision: 6, null: false
77 t.datetime "updated_at", precision: 6, null: false
78 t.index ["album_id"], name: "index_album_providers_on_album_id"
79 t.index ["user_id"], name: "index_album_providers_on_user_id"
80 end
81
82 create_table "album_votes", force: :cascade do |t|
83 t.bigint "user_id"
84 t.bigint "album_id"
85 t.datetime "created_at", precision: 6, null: false
86 t.datetime "updated_at", precision: 6, null: false
87 t.index ["album_id"], name: "index_album_votes_on_album_id"
88 t.index ["user_id"], name: "index_album_votes_on_user_id"
89 end
90
91 create_table "albums", force: :cascade do |t|
92 t.string "name"
93 t.text "description"
94 t.string "locale"
95 t.datetime "created_at", null: false
96 t.datetime "updated_at", null: false
97 t.integer "views_count", default: 0
98 t.bigint "user_id"
99 t.index ["user_id"], name: "index_albums_on_user_id"
100 end
101
102 create_table "artist_providers", force: :cascade do |t|
103 t.bigint "user_id"
104 t.string "provider_id"
105 t.integer "provider_type"
106 t.string "name"
107 t.string "genres"
108 t.datetime "created_at", precision: 6, null: false
109 t.datetime "updated_at", precision: 6, null: false
110 t.bigint "artist_id"
111 t.index ["artist_id"], name: "index_artist_providers_on_artist_id"
112 t.index ["user_id"], name: "index_artist_providers_on_user_id"
113 end
114
115 create_table "artist_votes", force: :cascade do |t|
116 t.bigint "user_id"
117 t.bigint "artist_id"
118 t.datetime "created_at", precision: 6, null: false
119 t.datetime "updated_at", precision: 6, null: false
120 t.index ["artist_id"], name: "index_artist_votes_on_artist_id"
121 t.index ["user_id"], name: "index_artist_votes_on_user_id"
122 end
123
124 create_table "artists", force: :cascade do |t|
125 t.string "name"
126 t.text "description"
127 t.datetime "created_at", null: false
128 t.datetime "updated_at", null: false
129 t.integer "views_count", default: 0
130 t.bigint "user_id"
131 t.index ["user_id"], name: "index_artists_on_user_id"
132 end
133
134 create_table "audio_file_bass64_statuses", force: :cascade do |t|
135 t.bigint "audio_file_id"
136 t.integer "status"
137 t.datetime "created_at", precision: 6, null: false
138 t.datetime "updated_at", precision: 6, null: false
139 t.integer "processing_progress", default: 0
140 t.index ["audio_file_id"], name: "index_audio_file_bass64_statuses_on_audio_file_id"
141 end
142
143 create_table "audio_file_bonzo_statuses", force: :cascade do |t|
144 t.integer "status"
145 t.bigint "audio_file_id"
146 t.datetime "created_at", precision: 6, null: false
147 t.datetime "updated_at", precision: 6, null: false
148 t.integer "processing_progress", default: 0
149 t.index ["audio_file_id"], name: "index_audio_file_bonzo_statuses_on_audio_file_id"
150 end
151
152 create_table "audio_file_karokowe_statuses", force: :cascade do |t|
153 t.bigint "audio_file_id"
154 t.integer "status"
155 t.datetime "created_at", precision: 6, null: false
156 t.datetime "updated_at", precision: 6, null: false
157 t.integer "processing_progress", default: 0
158 t.index ["audio_file_id"], name: "index_audio_file_karokowe_statuses_on_audio_file_id"
159 end
160
161 create_table "audio_file_split_statuses", force: :cascade do |t|
162 t.bigint "audio_file_id"
163 t.integer "status"
164 t.integer "processing_progress", default: 0
165 t.datetime "created_at", precision: 6, null: false
166 t.datetime "updated_at", precision: 6, null: false
167 t.index ["audio_file_id"], name: "index_audio_file_split_statuses_on_audio_file_id"
168 end
169
170 create_table "audio_files", force: :cascade do |t|
171 t.datetime "created_at", precision: 6, null: false
172 t.datetime "updated_at", precision: 6, null: false
173 t.bigint "song_provider_id"
174 t.integer "status", default: 0
175 t.integer "progress", default: 0
176 t.index ["song_provider_id"], name: "index_audio_files_on_song_provider_id"
177 end
178
179 create_table "authorizations", force: :cascade do |t|
180 t.bigint "user_id"
181 t.string "provider"
182 t.string "uid"
183 t.string "token"
184 t.datetime "created_at", precision: 6, null: false
185 t.datetime "updated_at", precision: 6, null: false
186 t.integer "onboarding_status", default: 0
187 t.boolean "onboarding_status_progress", default: false
188 t.string "refresh_token"
189 t.index ["user_id"], name: "index_authorizations_on_user_id"
190 end
191
192 create_table "badges_sashes", force: :cascade do |t|
193 t.integer "badge_id"
194 t.integer "sash_id"
195 t.boolean "notified_user", default: false
196 t.datetime "created_at"
197 t.index ["badge_id", "sash_id"], name: "index_badges_sashes_on_badge_id_and_sash_id"
198 t.index ["badge_id"], name: "index_badges_sashes_on_badge_id"
199 t.index ["sash_id"], name: "index_badges_sashes_on_sash_id"
200 end
201
202 create_table "bass_backing_track_files", force: :cascade do |t|
203 t.bigint "audio_file_id"
204 t.integer "status", default: 0
205 t.integer "status_progress", default: 0
206 t.integer "views_count"
207 t.datetime "created_at", precision: 6, null: false
208 t.datetime "updated_at", precision: 6, null: false
209 t.index ["audio_file_id"], name: "index_bass_backing_track_files_on_audio_file_id"
210 end
211
212 create_table "bass_backing_tracks", force: :cascade do |t|
213 t.boolean "is_public"
214 t.datetime "created_at", precision: 6, null: false
215 t.datetime "updated_at", precision: 6, null: false
216 t.bigint "audio_file_id"
217 t.index ["audio_file_id"], name: "index_bass_backing_tracks_on_audio_file_id"
218 end
219
220 create_table "bass_files", force: :cascade do |t|
221 t.bigint "audio_file_id"
222 t.datetime "created_at", precision: 6, null: false
223 t.datetime "updated_at", precision: 6, null: false
224 t.index ["audio_file_id"], name: "index_bass_files_on_audio_file_id"
225 end
226
227 create_table "chord_histories", force: :cascade do |t|
228 t.bigint "chord_id"
229 t.bigint "user_id"
230 t.string "name"
231 t.datetime "created_at", precision: 6, null: false
232 t.datetime "updated_at", precision: 6, null: false
233 t.index ["chord_id"], name: "index_chord_histories_on_chord_id"
234 t.index ["user_id"], name: "index_chord_histories_on_user_id"
235 end
236
237 create_table "chord_shapes", force: :cascade do |t|
238 t.string "name"
239 t.string "youtube_link"
240 t.string "image_link"
241 t.datetime "created_at", null: false
242 t.datetime "updated_at", null: false
243 end
244
245 create_table "chord_votes", force: :cascade do |t|
246 t.bigint "chord_id"
247 t.bigint "user_id"
248 t.datetime "created_at", precision: 6, null: false
249 t.datetime "updated_at", precision: 6, null: false
250 t.index ["chord_id"], name: "index_chord_votes_on_chord_id"
251 t.index ["user_id"], name: "index_chord_votes_on_user_id"
252 end
253
254 create_table "chords", force: :cascade do |t|
255 t.text "chord"
256 t.integer "views_count", default: 0
257 t.datetime "created_at", null: false
258 t.datetime "updated_at", null: false
259 t.bigint "user_id"
260 t.string "title"
261 t.integer "status", default: 0
262 t.bigint "song_provider_id"
263 t.index ["song_provider_id"], name: "index_chords_on_song_provider_id"
264 t.index ["user_id"], name: "index_chords_on_user_id"
265 end
266
267 create_table "chords_song_providers", id: false, force: :cascade do |t|
268 t.bigint "chord_id", null: false
269 t.bigint "song_provider_id", null: false
270 t.index ["chord_id"], name: "index_chords_song_providers_on_chord_id"
271 t.index ["song_provider_id"], name: "index_chords_song_providers_on_song_provider_id"
272 end
273
274 create_table "comments", force: :cascade do |t|
275 t.text "body"
276 t.integer "commentable_id"
277 t.string "commentable_type"
278 t.bigint "user_id"
279 t.datetime "created_at", precision: 6, null: false
280 t.datetime "updated_at", precision: 6, null: false
281 t.index ["user_id"], name: "index_comments_on_user_id"
282 end
283
284 create_table "drum_backing_tracks", force: :cascade do |t|
285 t.boolean "is_public"
286 t.bigint "audio_file_id"
287 t.datetime "created_at", precision: 6, null: false
288 t.datetime "updated_at", precision: 6, null: false
289 t.integer "status", default: 0
290 t.integer "status_progress", default: 0
291 t.integer "views_count", default: 0
292 t.index ["audio_file_id"], name: "index_drum_backing_tracks_on_audio_file_id"
293 end
294
295 create_table "drum_files", force: :cascade do |t|
296 t.bigint "audio_file_id"
297 t.datetime "created_at", precision: 6, null: false
298 t.datetime "updated_at", precision: 6, null: false
299 t.index ["audio_file_id"], name: "index_drum_files_on_audio_file_id"
300 end
301
302 create_table "gending_notation_votes", force: :cascade do |t|
303 t.bigint "user_id"
304 t.bigint "javanese_gending_notation_id"
305 t.datetime "created_at", precision: 6, null: false
306 t.datetime "updated_at", precision: 6, null: false
307 t.index ["javanese_gending_notation_id"], name: "index_gending_notation_votes_on_javanese_gending_notation_id"
308 t.index ["user_id"], name: "index_gending_notation_votes_on_user_id"
309 end
310
311 create_table "gending_votes", force: :cascade do |t|
312 t.bigint "user_id"
313 t.bigint "javanese_gending_id"
314 t.datetime "created_at", precision: 6, null: false
315 t.datetime "updated_at", precision: 6, null: false
316 t.index ["javanese_gending_id"], name: "index_gending_votes_on_javanese_gending_id"
317 t.index ["user_id"], name: "index_gending_votes_on_user_id"
318 end
319
320 create_table "guitar_backing_track_files", force: :cascade do |t|
321 t.bigint "audio_file_id"
322 t.integer "status", default: 0
323 t.integer "status_progress", default: 0
324 t.integer "views_count"
325 t.datetime "created_at", precision: 6, null: false
326 t.datetime "updated_at", precision: 6, null: false
327 t.index ["audio_file_id"], name: "index_guitar_backing_track_files_on_audio_file_id"
328 end
329
330 create_table "javanese_gending_notations", force: :cascade do |t|
331 t.string "name"
332 t.text "notation"
333 t.integer "views_count"
334 t.boolean "is_published"
335 t.bigint "user_id"
336 t.bigint "javanese_gending_id"
337 t.datetime "created_at", precision: 6, null: false
338 t.datetime "updated_at", precision: 6, null: false
339 t.json "rich_format"
340 t.index ["javanese_gending_id"], name: "index_javanese_gending_notations_on_javanese_gending_id"
341 t.index ["user_id"], name: "index_javanese_gending_notations_on_user_id"
342 end
343
344 create_table "javanese_gendings", force: :cascade do |t|
345 t.string "name"
346 t.text "description"
347 t.text "notation"
348 t.integer "views_count", default: 0
349 t.datetime "created_at", null: false
350 t.datetime "updated_at", null: false
351 t.boolean "is_published", default: false
352 t.bigint "user_id"
353 t.index ["user_id"], name: "index_javanese_gendings_on_user_id"
354 end
355
356 create_table "jwt_denylist", force: :cascade do |t|
357 t.string "jti", null: false
358 t.datetime "exp", null: false
359 t.index ["jti"], name: "index_jwt_denylist_on_jti"
360 end
361
362 create_table "karaoke_file_lovers", force: :cascade do |t|
363 t.bigint "karaoke_file_id"
364 t.bigint "user_id"
365 t.datetime "created_at", precision: 6, null: false
366 t.datetime "updated_at", precision: 6, null: false
367 t.integer "clicks_count"
368 t.index ["karaoke_file_id"], name: "index_karaoke_file_lovers_on_karaoke_file_id"
369 t.index ["user_id"], name: "index_karaoke_file_lovers_on_user_id"
370 end
371
372 create_table "karaoke_files", force: :cascade do |t|
373 t.string "link"
374 t.datetime "created_at", precision: 6, null: false
375 t.datetime "updated_at", precision: 6, null: false
376 t.integer "clicks_count", default: 0
377 t.bigint "audio_file_id"
378 t.boolean "is_public", default: false
379 t.index ["audio_file_id"], name: "index_karaoke_files_on_audio_file_id"
380 end
381
382 create_table "lyric_synches", force: :cascade do |t|
383 t.bigint "audio_file_id"
384 t.bigint "user_id"
385 t.string "lyric"
386 t.string "time"
387 t.datetime "created_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
388 t.datetime "updated_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
389 t.index ["audio_file_id"], name: "index_lyric_synches_on_audio_file_id"
390 t.index ["user_id"], name: "index_lyric_synches_on_user_id"
391 end
392
393 create_table "lyric_votes", force: :cascade do |t|
394 t.bigint "lyric_id"
395 t.bigint "user_id"
396 t.datetime "created_at", precision: 6, null: false
397 t.datetime "updated_at", precision: 6, null: false
398 t.index ["lyric_id"], name: "index_lyric_votes_on_lyric_id"
399 t.index ["user_id"], name: "index_lyric_votes_on_user_id"
400 end
401
402 create_table "lyrics", force: :cascade do |t|
403 t.text "lyric"
404 t.string "locale"
405 t.bigint "song_id"
406 t.datetime "created_at", null: false
407 t.datetime "updated_at", null: false
408 t.integer "views_count", default: 0
409 t.bigint "user_id"
410 t.boolean "is_published", default: false
411 t.index ["user_id"], name: "index_lyrics_on_user_id"
412 end
413
414 create_table "merit_actions", force: :cascade do |t|
415 t.integer "user_id"
416 t.string "action_method"
417 t.integer "action_value"
418 t.boolean "had_errors", default: false
419 t.string "target_model"
420 t.integer "target_id"
421 t.text "target_data"
422 t.boolean "processed", default: false
423 t.datetime "created_at", precision: 6, null: false
424 t.datetime "updated_at", precision: 6, null: false
425 t.index ["processed"], name: "index_merit_actions_on_processed"
426 end
427
428 create_table "merit_activity_logs", force: :cascade do |t|
429 t.integer "action_id"
430 t.string "related_change_type"
431 t.integer "related_change_id"
432 t.string "description"
433 t.datetime "created_at"
434 end
435
436 create_table "merit_score_points", force: :cascade do |t|
437 t.bigint "score_id"
438 t.bigint "num_points", default: 0
439 t.string "log"
440 t.datetime "created_at"
441 t.index ["score_id"], name: "index_merit_score_points_on_score_id"
442 end
443
444 create_table "merit_scores", force: :cascade do |t|
445 t.bigint "sash_id"
446 t.string "category", default: "default"
447 t.index ["sash_id"], name: "index_merit_scores_on_sash_id"
448 end
449
450 create_table "meta", id: :bigint, default: -> { "nextval('meta_pages_id_seq'::regclass)" }, force: :cascade do |t|
451 t.string "home"
452 t.string "title"
453 t.text "description"
454 t.datetime "created_at", precision: 6, null: false
455 t.datetime "updated_at", precision: 6, null: false
456 t.string "locale"
457 end
458
459 create_table "meta_pages", id: :serial, force: :cascade do |t|
460 end
461
462 create_table "other_files", force: :cascade do |t|
463 t.bigint "audio_file_id"
464 t.datetime "created_at", precision: 6, null: false
465 t.datetime "updated_at", precision: 6, null: false
466 t.index ["audio_file_id"], name: "index_other_files_on_audio_file_id"
467 end
468
469 create_table "pages", force: :cascade do |t|
470 t.string "page_slug"
471 t.text "page_content"
472 t.string "locale"
473 t.datetime "created_at", null: false
474 t.datetime "updated_at", null: false
475 t.string "title"
476 t.integer "category"
477 end
478
479 create_table "relationships", force: :cascade do |t|
480 t.integer "follower_id"
481 t.integer "followed_id"
482 t.datetime "created_at", precision: 6, null: false
483 t.datetime "updated_at", precision: 6, null: false
484 t.index ["followed_id"], name: "index_relationships_on_followed_id"
485 t.index ["follower_id", "followed_id"], name: "index_relationships_on_follower_id_and_followed_id", unique: true
486 t.index ["follower_id"], name: "index_relationships_on_follower_id"
487 end
488
489 create_table "sashes", force: :cascade do |t|
490 t.datetime "created_at", precision: 6, null: false
491 t.datetime "updated_at", precision: 6, null: false
492 end
493
494 create_table "search_terms", force: :cascade do |t|
495 t.string "term"
496 t.integer "count"
497 t.datetime "created_at", precision: 6, null: false
498 t.datetime "updated_at", precision: 6, null: false
499 end
500
501 create_table "song_artists", force: :cascade do |t|
502 t.boolean "primary"
503 t.bigint "song_id"
504 t.bigint "artist_id"
505 t.datetime "created_at", null: false
506 t.datetime "updated_at", null: false
507 t.bigint "song_provider_id"
508 t.bigint "artist_provider_id"
509 t.index ["artist_id"], name: "index_song_artists_on_artist_id"
510 t.index ["artist_provider_id"], name: "index_song_artists_on_artist_provider_id"
511 t.index ["song_id"], name: "index_song_artists_on_song_id"
512 t.index ["song_provider_id"], name: "index_song_artists_on_song_provider_id"
513 end
514
515 create_table "song_chord_pleas", force: :cascade do |t|
516 t.bigint "song_id"
517 t.bigint "user_id"
518 t.index ["song_id"], name: "index_song_chord_pleas_on_song_id"
519 t.index ["user_id"], name: "index_song_chord_pleas_on_user_id"
520 end
521
522 create_table "song_provider_chords", force: :cascade do |t|
523 t.bigint "song_provider_id"
524 t.bigint "chord_id"
525 t.integer "status", default: 0
526 t.datetime "created_at", precision: 6, null: false
527 t.datetime "updated_at", precision: 6, null: false
528 t.index ["chord_id"], name: "index_song_provider_chords_on_chord_id"
529 t.index ["song_provider_id"], name: "index_song_provider_chords_on_song_provider_id"
530 end
531
532 create_table "song_provider_votes", force: :cascade do |t|
533 t.bigint "song_provider_id"
534 t.bigint "user_id"
535 t.integer "vote_type", default: 0
536 t.datetime "created_at", precision: 6, null: false
537 t.datetime "updated_at", precision: 6, null: false
538 t.index ["song_provider_id"], name: "index_song_provider_votes_on_song_provider_id"
539 t.index ["user_id"], name: "index_song_provider_votes_on_user_id"
540 end
541
542 create_table "song_providers", force: :cascade do |t|
543 t.bigint "user_id"
544 t.bigint "song_id"
545 t.string "provider_id"
546 t.integer "provider_type"
547 t.string "name"
548 t.string "preview_url"
549 t.datetime "created_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
550 t.datetime "updated_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
551 t.string "description"
552 t.string "image_url"
553 t.integer "status", default: 0
554 t.index ["provider_id", "provider_type"], name: "index_song_providers_on_provider_id_and_provider_type", unique: true
555 t.index ["song_id"], name: "index_song_providers_on_song_id"
556 t.index ["user_id"], name: "index_song_providers_on_user_id"
557 end
558
559 create_table "songs", force: :cascade do |t|
560 t.string "name"
561 t.text "description"
562 t.string "locale"
563 t.datetime "created_at", null: false
564 t.datetime "updated_at", null: false
565 t.bigint "album_id"
566 t.integer "views_count", default: 0
567 t.bigint "user_id"
568 t.index ["album_id"], name: "index_songs_on_album_id"
569 t.index ["user_id"], name: "index_songs_on_user_id"
570 end
571
572 create_table "splitfire_results", force: :cascade do |t|
573 t.bigint "audio_file_id"
574 t.datetime "created_at", precision: 6, null: false
575 t.datetime "updated_at", precision: 6, null: false
576 t.float "length"
577 t.json "onset"
578 t.index ["audio_file_id"], name: "index_splitfire_results_on_audio_file_id"
579 end
580
581 create_table "tolk_locales", id: :serial, force: :cascade do |t|
582 t.string "name"
583 t.datetime "created_at"
584 t.datetime "updated_at"
585 t.index ["name"], name: "index_tolk_locales_on_name", unique: true
586 end
587
588 create_table "tolk_phrases", id: :serial, force: :cascade do |t|
589 t.text "key"
590 t.datetime "created_at"
591 t.datetime "updated_at"
592 end
593
594 create_table "tolk_translations", id: :serial, force: :cascade do |t|
595 t.integer "phrase_id"
596 t.integer "locale_id"
597 t.text "text"
598 t.text "previous_text"
599 t.boolean "primary_updated", default: false
600 t.datetime "created_at"
601 t.datetime "updated_at"
602 t.index ["phrase_id", "locale_id"], name: "index_tolk_translations_on_phrase_id_and_locale_id", unique: true
603 end
604
605 create_table "user_settings", force: :cascade do |t|
606 t.bigint "user_id"
607 t.integer "model"
608 t.integer "frequency"
609 t.datetime "created_at", precision: 6, null: false
610 t.datetime "updated_at", precision: 6, null: false
611 t.integer "locale", default: 0
612 t.integer "sync_spotify", default: 1
613 t.integer "allowed_use_google_token", default: 0
614 t.integer "allowed_use_spotify_token", default: 0
615 t.index ["user_id"], name: "index_user_settings_on_user_id"
616 end
617
618 create_table "users", force: :cascade do |t|
619 t.string "name"
620 t.string "email"
621 t.datetime "created_at", null: false
622 t.datetime "updated_at", null: false
623 t.string "remember_digest"
624 t.string "username"
625 t.text "image"
626 t.string "provider"
627 t.string "uid"
628 t.boolean "is_private", default: false
629 t.string "encrypted_password", default: "", null: false
630 t.string "reset_password_token"
631 t.datetime "reset_password_sent_at"
632 t.datetime "remember_created_at"
633 t.boolean "admin"
634 t.string "instagram"
635 t.string "youtube_channel_id"
636 t.string "about"
637 t.string "confirmation_token"
638 t.datetime "confirmed_at"
639 t.datetime "confirmation_sent_at"
640 t.string "unconfirmed_email"
641 t.string "invitation_token"
642 t.datetime "invitation_created_at"
643 t.datetime "invitation_sent_at"
644 t.datetime "invitation_accepted_at"
645 t.integer "invitation_limit"
646 t.string "invited_by_type"
647 t.bigint "invited_by_id"
648 t.integer "invitations_count", default: 0
649 t.integer "sash_id"
650 t.integer "level", default: 0
651 t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
652 t.index ["email"], name: "index_users_on_email", unique: true
653 t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
654 t.index ["invited_by_id"], name: "index_users_on_invited_by_id"
655 t.index ["invited_by_type", "invited_by_id"], name: "index_users_on_invited_by"
656 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
657 end
658
659 create_table "vocal_files", force: :cascade do |t|
660 t.bigint "audio_file_id"
661 t.datetime "created_at", precision: 6, null: false
662 t.datetime "updated_at", precision: 6, null: false
663 t.index ["audio_file_id"], name: "index_vocal_files_on_audio_file_id"
664 end
665
666 create_table "wallets", force: :cascade do |t|
667 t.bigint "user_id"
668 t.string "pubkey"
669 t.text "seed_phrase"
670 t.datetime "created_at", precision: 6, null: false
671 t.datetime "updated_at", precision: 6, null: false
672 t.integer "status"
673 t.string "bach_token_account"
674 t.integer "wallet_type", default: 1
675 t.index ["user_id"], name: "index_wallets_on_user_id"
676 end
677
678 add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
679 add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
680 add_foreign_key "album_artists", "albums"
681 add_foreign_key "album_artists", "artists"
682 add_foreign_key "album_providers", "albums"
683 add_foreign_key "album_providers", "users"
684 add_foreign_key "album_votes", "albums"
685 add_foreign_key "album_votes", "users"
686 add_foreign_key "albums", "users"
687 add_foreign_key "artist_providers", "artists"
688 add_foreign_key "artist_providers", "users"
689 add_foreign_key "artist_votes", "artists"
690 add_foreign_key "artist_votes", "users"
691 add_foreign_key "artists", "users"
692 add_foreign_key "audio_file_bass64_statuses", "audio_files"
693 add_foreign_key "audio_file_bonzo_statuses", "audio_files"
694 add_foreign_key "audio_file_karokowe_statuses", "audio_files"
695 add_foreign_key "audio_file_split_statuses", "audio_files"
696 add_foreign_key "authorizations", "users"
697 add_foreign_key "bass_backing_track_files", "audio_files"
698 add_foreign_key "bass_backing_tracks", "audio_files"
699 add_foreign_key "bass_files", "audio_files"
700 add_foreign_key "chord_histories", "chords"
701 add_foreign_key "chord_histories", "users"
702 add_foreign_key "chord_votes", "chords"
703 add_foreign_key "chord_votes", "users"
704 add_foreign_key "chords", "song_providers"
705 add_foreign_key "chords", "users"
706 add_foreign_key "comments", "users"
707 add_foreign_key "drum_backing_tracks", "audio_files"
708 add_foreign_key "drum_files", "audio_files"
709 add_foreign_key "gending_notation_votes", "javanese_gending_notations"
710 add_foreign_key "gending_notation_votes", "users"
711 add_foreign_key "gending_votes", "javanese_gendings"
712 add_foreign_key "gending_votes", "users"
713 add_foreign_key "guitar_backing_track_files", "audio_files"
714 add_foreign_key "javanese_gending_notations", "javanese_gendings"
715 add_foreign_key "javanese_gending_notations", "users"
716 add_foreign_key "javanese_gendings", "users"
717 add_foreign_key "karaoke_file_lovers", "karaoke_files"
718 add_foreign_key "karaoke_file_lovers", "users"
719 add_foreign_key "karaoke_files", "audio_files"
720 add_foreign_key "lyric_synches", "audio_files"
721 add_foreign_key "lyric_synches", "users"
722 add_foreign_key "lyric_votes", "lyrics"
723 add_foreign_key "lyric_votes", "users"
724 add_foreign_key "lyrics", "songs"
725 add_foreign_key "lyrics", "users"
726 add_foreign_key "other_files", "audio_files"
727 add_foreign_key "song_artists", "artist_providers"
728 add_foreign_key "song_artists", "artists"
729 add_foreign_key "song_artists", "song_providers"
730 add_foreign_key "song_artists", "songs"
731 add_foreign_key "song_chord_pleas", "songs"
732 add_foreign_key "song_chord_pleas", "users"
733 add_foreign_key "song_provider_chords", "chords"
734 add_foreign_key "song_provider_chords", "song_providers"
735 add_foreign_key "song_provider_votes", "song_providers"
736 add_foreign_key "song_provider_votes", "users"
737 add_foreign_key "song_providers", "songs"
738 add_foreign_key "song_providers", "users"
739 add_foreign_key "songs", "albums"
740 add_foreign_key "songs", "users"
741 add_foreign_key "splitfire_results", "audio_files"
742 add_foreign_key "user_settings", "users"
743 add_foreign_key "vocal_files", "audio_files"
744 add_foreign_key "wallets", "users"
745 end