A lightly modified copy of Mastodon, the canonical repository for Chinwag Social's live code. https://social.chinwag.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

schema.rb 43KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  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. # Note that this schema.rb definition is the authoritative source for your
  6. # database schema. If you need to create the application database on another
  7. # system, you should be using db:schema:load, not running all the migrations
  8. # from scratch. The latter is a flawed and unsustainable approach (the more migrations
  9. # you'll amass, the slower it'll run and the greater likelihood for issues).
  10. #
  11. # It's strongly recommended that you check this file into your version control system.
  12. ActiveRecord::Schema.define(version: 2020_05_10_110808) do
  13. # These are extensions that must be enabled in order to support this database
  14. enable_extension "plpgsql"
  15. create_table "account_aliases", force: :cascade do |t|
  16. t.bigint "account_id"
  17. t.string "acct", default: "", null: false
  18. t.string "uri", default: "", null: false
  19. t.datetime "created_at", null: false
  20. t.datetime "updated_at", null: false
  21. t.index ["account_id"], name: "index_account_aliases_on_account_id"
  22. end
  23. create_table "account_conversations", force: :cascade do |t|
  24. t.bigint "account_id"
  25. t.bigint "conversation_id"
  26. t.bigint "participant_account_ids", default: [], null: false, array: true
  27. t.bigint "status_ids", default: [], null: false, array: true
  28. t.bigint "last_status_id"
  29. t.integer "lock_version", default: 0, null: false
  30. t.boolean "unread", default: false, null: false
  31. t.index ["account_id", "conversation_id", "participant_account_ids"], name: "index_unique_conversations", unique: true
  32. t.index ["account_id"], name: "index_account_conversations_on_account_id"
  33. t.index ["conversation_id"], name: "index_account_conversations_on_conversation_id"
  34. end
  35. create_table "account_domain_blocks", force: :cascade do |t|
  36. t.string "domain"
  37. t.datetime "created_at", null: false
  38. t.datetime "updated_at", null: false
  39. t.bigint "account_id"
  40. t.index ["account_id", "domain"], name: "index_account_domain_blocks_on_account_id_and_domain", unique: true
  41. end
  42. create_table "account_identity_proofs", force: :cascade do |t|
  43. t.bigint "account_id"
  44. t.string "provider", default: "", null: false
  45. t.string "provider_username", default: "", null: false
  46. t.text "token", default: "", null: false
  47. t.boolean "verified", default: false, null: false
  48. t.boolean "live", default: false, null: false
  49. t.datetime "created_at", null: false
  50. t.datetime "updated_at", null: false
  51. t.index ["account_id", "provider", "provider_username"], name: "index_account_proofs_on_account_and_provider_and_username", unique: true
  52. t.index ["account_id"], name: "index_account_identity_proofs_on_account_id"
  53. end
  54. create_table "account_migrations", force: :cascade do |t|
  55. t.bigint "account_id"
  56. t.string "acct", default: "", null: false
  57. t.bigint "followers_count", default: 0, null: false
  58. t.bigint "target_account_id"
  59. t.datetime "created_at", null: false
  60. t.datetime "updated_at", null: false
  61. t.index ["account_id"], name: "index_account_migrations_on_account_id"
  62. t.index ["target_account_id"], name: "index_account_migrations_on_target_account_id"
  63. end
  64. create_table "account_moderation_notes", force: :cascade do |t|
  65. t.text "content", null: false
  66. t.bigint "account_id", null: false
  67. t.bigint "target_account_id", null: false
  68. t.datetime "created_at", null: false
  69. t.datetime "updated_at", null: false
  70. t.index ["account_id"], name: "index_account_moderation_notes_on_account_id"
  71. t.index ["target_account_id"], name: "index_account_moderation_notes_on_target_account_id"
  72. end
  73. create_table "account_pins", force: :cascade do |t|
  74. t.bigint "account_id"
  75. t.bigint "target_account_id"
  76. t.datetime "created_at", null: false
  77. t.datetime "updated_at", null: false
  78. t.index ["account_id", "target_account_id"], name: "index_account_pins_on_account_id_and_target_account_id", unique: true
  79. t.index ["account_id"], name: "index_account_pins_on_account_id"
  80. t.index ["target_account_id"], name: "index_account_pins_on_target_account_id"
  81. end
  82. create_table "account_stats", force: :cascade do |t|
  83. t.bigint "account_id", null: false
  84. t.bigint "statuses_count", default: 0, null: false
  85. t.bigint "following_count", default: 0, null: false
  86. t.bigint "followers_count", default: 0, null: false
  87. t.datetime "created_at", null: false
  88. t.datetime "updated_at", null: false
  89. t.datetime "last_status_at"
  90. t.integer "lock_version", default: 0, null: false
  91. t.index ["account_id"], name: "index_account_stats_on_account_id", unique: true
  92. end
  93. create_table "account_tag_stats", force: :cascade do |t|
  94. t.bigint "tag_id", null: false
  95. t.bigint "accounts_count", default: 0, null: false
  96. t.boolean "hidden", default: false, null: false
  97. t.datetime "created_at", null: false
  98. t.datetime "updated_at", null: false
  99. t.index ["tag_id"], name: "index_account_tag_stats_on_tag_id", unique: true
  100. end
  101. create_table "account_warning_presets", force: :cascade do |t|
  102. t.text "text", default: "", null: false
  103. t.datetime "created_at", null: false
  104. t.datetime "updated_at", null: false
  105. t.string "title", default: "", null: false
  106. end
  107. create_table "account_warnings", force: :cascade do |t|
  108. t.bigint "account_id"
  109. t.bigint "target_account_id"
  110. t.integer "action", default: 0, null: false
  111. t.text "text", default: "", null: false
  112. t.datetime "created_at", null: false
  113. t.datetime "updated_at", null: false
  114. t.index ["account_id"], name: "index_account_warnings_on_account_id"
  115. t.index ["target_account_id"], name: "index_account_warnings_on_target_account_id"
  116. end
  117. create_table "accounts", force: :cascade do |t|
  118. t.string "username", default: "", null: false
  119. t.string "domain"
  120. t.string "secret", default: "", null: false
  121. t.text "private_key"
  122. t.text "public_key", default: "", null: false
  123. t.string "remote_url", default: "", null: false
  124. t.string "salmon_url", default: "", null: false
  125. t.string "hub_url", default: "", null: false
  126. t.datetime "created_at", null: false
  127. t.datetime "updated_at", null: false
  128. t.text "note", default: "", null: false
  129. t.string "display_name", default: "", null: false
  130. t.string "uri", default: "", null: false
  131. t.string "url"
  132. t.string "avatar_file_name"
  133. t.string "avatar_content_type"
  134. t.integer "avatar_file_size"
  135. t.datetime "avatar_updated_at"
  136. t.string "header_file_name"
  137. t.string "header_content_type"
  138. t.integer "header_file_size"
  139. t.datetime "header_updated_at"
  140. t.string "avatar_remote_url"
  141. t.datetime "subscription_expires_at"
  142. t.boolean "locked", default: false, null: false
  143. t.string "header_remote_url", default: "", null: false
  144. t.datetime "last_webfingered_at"
  145. t.string "inbox_url", default: "", null: false
  146. t.string "outbox_url", default: "", null: false
  147. t.string "shared_inbox_url", default: "", null: false
  148. t.string "followers_url", default: "", null: false
  149. t.integer "protocol", default: 0, null: false
  150. t.boolean "memorial", default: false, null: false
  151. t.bigint "moved_to_account_id"
  152. t.string "featured_collection_url"
  153. t.jsonb "fields"
  154. t.string "actor_type"
  155. t.boolean "discoverable"
  156. t.string "also_known_as", array: true
  157. t.datetime "silenced_at"
  158. t.datetime "suspended_at"
  159. t.integer "trust_level"
  160. t.boolean "hide_collections"
  161. t.integer "avatar_storage_schema_version"
  162. t.integer "header_storage_schema_version"
  163. t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin
  164. t.index "lower((username)::text), lower((domain)::text)", name: "index_accounts_on_username_and_domain_lower", unique: true
  165. t.index ["moved_to_account_id"], name: "index_accounts_on_moved_to_account_id"
  166. t.index ["uri"], name: "index_accounts_on_uri"
  167. t.index ["url"], name: "index_accounts_on_url"
  168. end
  169. create_table "accounts_tags", id: false, force: :cascade do |t|
  170. t.bigint "account_id", null: false
  171. t.bigint "tag_id", null: false
  172. t.index ["account_id", "tag_id"], name: "index_accounts_tags_on_account_id_and_tag_id"
  173. t.index ["tag_id", "account_id"], name: "index_accounts_tags_on_tag_id_and_account_id", unique: true
  174. end
  175. create_table "admin_action_logs", force: :cascade do |t|
  176. t.bigint "account_id"
  177. t.string "action", default: "", null: false
  178. t.string "target_type"
  179. t.bigint "target_id"
  180. t.text "recorded_changes", default: "", null: false
  181. t.datetime "created_at", null: false
  182. t.datetime "updated_at", null: false
  183. t.index ["account_id"], name: "index_admin_action_logs_on_account_id"
  184. t.index ["target_type", "target_id"], name: "index_admin_action_logs_on_target_type_and_target_id"
  185. end
  186. create_table "announcement_mutes", force: :cascade do |t|
  187. t.bigint "account_id"
  188. t.bigint "announcement_id"
  189. t.datetime "created_at", null: false
  190. t.datetime "updated_at", null: false
  191. t.index ["account_id", "announcement_id"], name: "index_announcement_mutes_on_account_id_and_announcement_id", unique: true
  192. t.index ["account_id"], name: "index_announcement_mutes_on_account_id"
  193. t.index ["announcement_id"], name: "index_announcement_mutes_on_announcement_id"
  194. end
  195. create_table "announcement_reactions", force: :cascade do |t|
  196. t.bigint "account_id"
  197. t.bigint "announcement_id"
  198. t.string "name", default: "", null: false
  199. t.bigint "custom_emoji_id"
  200. t.datetime "created_at", null: false
  201. t.datetime "updated_at", null: false
  202. t.index ["account_id", "announcement_id", "name"], name: "index_announcement_reactions_on_account_id_and_announcement_id", unique: true
  203. t.index ["account_id"], name: "index_announcement_reactions_on_account_id"
  204. t.index ["announcement_id"], name: "index_announcement_reactions_on_announcement_id"
  205. t.index ["custom_emoji_id"], name: "index_announcement_reactions_on_custom_emoji_id"
  206. end
  207. create_table "announcements", force: :cascade do |t|
  208. t.text "text", default: "", null: false
  209. t.boolean "published", default: false, null: false
  210. t.boolean "all_day", default: false, null: false
  211. t.datetime "scheduled_at"
  212. t.datetime "starts_at"
  213. t.datetime "ends_at"
  214. t.datetime "created_at", null: false
  215. t.datetime "updated_at", null: false
  216. t.datetime "published_at"
  217. t.bigint "status_ids", array: true
  218. end
  219. create_table "backups", force: :cascade do |t|
  220. t.bigint "user_id"
  221. t.string "dump_file_name"
  222. t.string "dump_content_type"
  223. t.datetime "dump_updated_at"
  224. t.boolean "processed", default: false, null: false
  225. t.datetime "created_at", null: false
  226. t.datetime "updated_at", null: false
  227. t.bigint "dump_file_size"
  228. end
  229. create_table "blocks", force: :cascade do |t|
  230. t.datetime "created_at", null: false
  231. t.datetime "updated_at", null: false
  232. t.bigint "account_id", null: false
  233. t.bigint "target_account_id", null: false
  234. t.string "uri"
  235. t.index ["account_id", "target_account_id"], name: "index_blocks_on_account_id_and_target_account_id", unique: true
  236. t.index ["target_account_id"], name: "index_blocks_on_target_account_id"
  237. end
  238. create_table "bookmarks", force: :cascade do |t|
  239. t.bigint "account_id", null: false
  240. t.bigint "status_id", null: false
  241. t.datetime "created_at", null: false
  242. t.datetime "updated_at", null: false
  243. t.index ["account_id", "status_id"], name: "index_bookmarks_on_account_id_and_status_id", unique: true
  244. t.index ["account_id"], name: "index_bookmarks_on_account_id"
  245. t.index ["status_id"], name: "index_bookmarks_on_status_id"
  246. end
  247. create_table "conversation_mutes", force: :cascade do |t|
  248. t.bigint "conversation_id", null: false
  249. t.bigint "account_id", null: false
  250. t.index ["account_id", "conversation_id"], name: "index_conversation_mutes_on_account_id_and_conversation_id", unique: true
  251. end
  252. create_table "conversations", force: :cascade do |t|
  253. t.string "uri"
  254. t.datetime "created_at", null: false
  255. t.datetime "updated_at", null: false
  256. t.index ["uri"], name: "index_conversations_on_uri", unique: true
  257. end
  258. create_table "custom_emoji_categories", force: :cascade do |t|
  259. t.string "name"
  260. t.datetime "created_at", null: false
  261. t.datetime "updated_at", null: false
  262. t.index ["name"], name: "index_custom_emoji_categories_on_name", unique: true
  263. end
  264. create_table "custom_emojis", force: :cascade do |t|
  265. t.string "shortcode", default: "", null: false
  266. t.string "domain"
  267. t.string "image_file_name"
  268. t.string "image_content_type"
  269. t.integer "image_file_size"
  270. t.datetime "image_updated_at"
  271. t.datetime "created_at", null: false
  272. t.datetime "updated_at", null: false
  273. t.boolean "disabled", default: false, null: false
  274. t.string "uri"
  275. t.string "image_remote_url"
  276. t.boolean "visible_in_picker", default: true, null: false
  277. t.bigint "category_id"
  278. t.integer "image_storage_schema_version"
  279. t.index ["shortcode", "domain"], name: "index_custom_emojis_on_shortcode_and_domain", unique: true
  280. end
  281. create_table "custom_filters", force: :cascade do |t|
  282. t.bigint "account_id"
  283. t.datetime "expires_at"
  284. t.text "phrase", default: "", null: false
  285. t.string "context", default: [], null: false, array: true
  286. t.boolean "irreversible", default: false, null: false
  287. t.datetime "created_at", null: false
  288. t.datetime "updated_at", null: false
  289. t.boolean "whole_word", default: true, null: false
  290. t.index ["account_id"], name: "index_custom_filters_on_account_id"
  291. end
  292. create_table "domain_allows", force: :cascade do |t|
  293. t.string "domain", default: "", null: false
  294. t.datetime "created_at", null: false
  295. t.datetime "updated_at", null: false
  296. t.index ["domain"], name: "index_domain_allows_on_domain", unique: true
  297. end
  298. create_table "domain_blocks", force: :cascade do |t|
  299. t.string "domain", default: "", null: false
  300. t.datetime "created_at", null: false
  301. t.datetime "updated_at", null: false
  302. t.integer "severity", default: 0
  303. t.boolean "reject_media", default: false, null: false
  304. t.boolean "reject_reports", default: false, null: false
  305. t.text "private_comment"
  306. t.text "public_comment"
  307. t.index ["domain"], name: "index_domain_blocks_on_domain", unique: true
  308. end
  309. create_table "email_domain_blocks", force: :cascade do |t|
  310. t.string "domain", default: "", null: false
  311. t.datetime "created_at", null: false
  312. t.datetime "updated_at", null: false
  313. t.bigint "parent_id"
  314. t.index ["domain"], name: "index_email_domain_blocks_on_domain", unique: true
  315. end
  316. create_table "favourites", force: :cascade do |t|
  317. t.datetime "created_at", null: false
  318. t.datetime "updated_at", null: false
  319. t.bigint "account_id", null: false
  320. t.bigint "status_id", null: false
  321. t.index ["account_id", "id"], name: "index_favourites_on_account_id_and_id"
  322. t.index ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true
  323. t.index ["status_id"], name: "index_favourites_on_status_id"
  324. end
  325. create_table "featured_tags", force: :cascade do |t|
  326. t.bigint "account_id"
  327. t.bigint "tag_id"
  328. t.bigint "statuses_count", default: 0, null: false
  329. t.datetime "last_status_at"
  330. t.datetime "created_at", null: false
  331. t.datetime "updated_at", null: false
  332. t.index ["account_id"], name: "index_featured_tags_on_account_id"
  333. t.index ["tag_id"], name: "index_featured_tags_on_tag_id"
  334. end
  335. create_table "follow_requests", force: :cascade do |t|
  336. t.datetime "created_at", null: false
  337. t.datetime "updated_at", null: false
  338. t.bigint "account_id", null: false
  339. t.bigint "target_account_id", null: false
  340. t.boolean "show_reblogs", default: true, null: false
  341. t.string "uri"
  342. t.index ["account_id", "target_account_id"], name: "index_follow_requests_on_account_id_and_target_account_id", unique: true
  343. end
  344. create_table "follows", force: :cascade do |t|
  345. t.datetime "created_at", null: false
  346. t.datetime "updated_at", null: false
  347. t.bigint "account_id", null: false
  348. t.bigint "target_account_id", null: false
  349. t.boolean "show_reblogs", default: true, null: false
  350. t.string "uri"
  351. t.index ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true
  352. t.index ["target_account_id"], name: "index_follows_on_target_account_id"
  353. end
  354. create_table "identities", force: :cascade do |t|
  355. t.string "provider", default: "", null: false
  356. t.string "uid", default: "", null: false
  357. t.datetime "created_at", null: false
  358. t.datetime "updated_at", null: false
  359. t.bigint "user_id"
  360. t.index ["user_id"], name: "index_identities_on_user_id"
  361. end
  362. create_table "imports", force: :cascade do |t|
  363. t.integer "type", null: false
  364. t.boolean "approved", default: false, null: false
  365. t.datetime "created_at", null: false
  366. t.datetime "updated_at", null: false
  367. t.string "data_file_name"
  368. t.string "data_content_type"
  369. t.integer "data_file_size"
  370. t.datetime "data_updated_at"
  371. t.bigint "account_id", null: false
  372. t.boolean "overwrite", default: false, null: false
  373. end
  374. create_table "invites", force: :cascade do |t|
  375. t.bigint "user_id", null: false
  376. t.string "code", default: "", null: false
  377. t.datetime "expires_at"
  378. t.integer "max_uses"
  379. t.integer "uses", default: 0, null: false
  380. t.datetime "created_at", null: false
  381. t.datetime "updated_at", null: false
  382. t.boolean "autofollow", default: false, null: false
  383. t.text "comment"
  384. t.index ["code"], name: "index_invites_on_code", unique: true
  385. t.index ["user_id"], name: "index_invites_on_user_id"
  386. end
  387. create_table "list_accounts", force: :cascade do |t|
  388. t.bigint "list_id", null: false
  389. t.bigint "account_id", null: false
  390. t.bigint "follow_id"
  391. t.index ["account_id", "list_id"], name: "index_list_accounts_on_account_id_and_list_id", unique: true
  392. t.index ["follow_id"], name: "index_list_accounts_on_follow_id"
  393. t.index ["list_id", "account_id"], name: "index_list_accounts_on_list_id_and_account_id"
  394. end
  395. create_table "lists", force: :cascade do |t|
  396. t.bigint "account_id", null: false
  397. t.string "title", default: "", null: false
  398. t.datetime "created_at", null: false
  399. t.datetime "updated_at", null: false
  400. t.index ["account_id"], name: "index_lists_on_account_id"
  401. end
  402. create_table "markers", force: :cascade do |t|
  403. t.bigint "user_id"
  404. t.string "timeline", default: "", null: false
  405. t.bigint "last_read_id", default: 0, null: false
  406. t.integer "lock_version", default: 0, null: false
  407. t.datetime "created_at", null: false
  408. t.datetime "updated_at", null: false
  409. t.index ["user_id", "timeline"], name: "index_markers_on_user_id_and_timeline", unique: true
  410. t.index ["user_id"], name: "index_markers_on_user_id"
  411. end
  412. create_table "media_attachments", force: :cascade do |t|
  413. t.bigint "status_id"
  414. t.string "file_file_name"
  415. t.string "file_content_type"
  416. t.integer "file_file_size"
  417. t.datetime "file_updated_at"
  418. t.string "remote_url", default: "", null: false
  419. t.datetime "created_at", null: false
  420. t.datetime "updated_at", null: false
  421. t.string "shortcode"
  422. t.integer "type", default: 0, null: false
  423. t.json "file_meta"
  424. t.bigint "account_id"
  425. t.text "description"
  426. t.bigint "scheduled_status_id"
  427. t.string "blurhash"
  428. t.integer "processing"
  429. t.integer "file_storage_schema_version"
  430. t.index ["account_id"], name: "index_media_attachments_on_account_id"
  431. t.index ["scheduled_status_id"], name: "index_media_attachments_on_scheduled_status_id"
  432. t.index ["shortcode"], name: "index_media_attachments_on_shortcode", unique: true
  433. t.index ["status_id"], name: "index_media_attachments_on_status_id"
  434. end
  435. create_table "mentions", force: :cascade do |t|
  436. t.bigint "status_id"
  437. t.datetime "created_at", null: false
  438. t.datetime "updated_at", null: false
  439. t.bigint "account_id"
  440. t.boolean "silent", default: false, null: false
  441. t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true
  442. t.index ["status_id"], name: "index_mentions_on_status_id"
  443. end
  444. create_table "mutes", force: :cascade do |t|
  445. t.datetime "created_at", null: false
  446. t.datetime "updated_at", null: false
  447. t.boolean "hide_notifications", default: true, null: false
  448. t.bigint "account_id", null: false
  449. t.bigint "target_account_id", null: false
  450. t.index ["account_id", "target_account_id"], name: "index_mutes_on_account_id_and_target_account_id", unique: true
  451. t.index ["target_account_id"], name: "index_mutes_on_target_account_id"
  452. end
  453. create_table "notifications", force: :cascade do |t|
  454. t.bigint "activity_id", null: false
  455. t.string "activity_type", null: false
  456. t.datetime "created_at", null: false
  457. t.datetime "updated_at", null: false
  458. t.bigint "account_id", null: false
  459. t.bigint "from_account_id", null: false
  460. t.index ["account_id", "activity_id", "activity_type"], name: "account_activity", unique: true
  461. t.index ["account_id", "id"], name: "index_notifications_on_account_id_and_id", order: { id: :desc }
  462. t.index ["activity_id", "activity_type"], name: "index_notifications_on_activity_id_and_activity_type"
  463. t.index ["from_account_id"], name: "index_notifications_on_from_account_id"
  464. end
  465. create_table "oauth_access_grants", force: :cascade do |t|
  466. t.string "token", null: false
  467. t.integer "expires_in", null: false
  468. t.text "redirect_uri", null: false
  469. t.datetime "created_at", null: false
  470. t.datetime "revoked_at"
  471. t.string "scopes"
  472. t.bigint "application_id", null: false
  473. t.bigint "resource_owner_id", null: false
  474. t.index ["resource_owner_id"], name: "index_oauth_access_grants_on_resource_owner_id"
  475. t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true
  476. end
  477. create_table "oauth_access_tokens", force: :cascade do |t|
  478. t.string "token", null: false
  479. t.string "refresh_token"
  480. t.integer "expires_in"
  481. t.datetime "revoked_at"
  482. t.datetime "created_at", null: false
  483. t.string "scopes"
  484. t.bigint "application_id"
  485. t.bigint "resource_owner_id"
  486. t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true
  487. t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id"
  488. t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true
  489. end
  490. create_table "oauth_applications", force: :cascade do |t|
  491. t.string "name", null: false
  492. t.string "uid", null: false
  493. t.string "secret", null: false
  494. t.text "redirect_uri", null: false
  495. t.string "scopes", default: "", null: false
  496. t.datetime "created_at"
  497. t.datetime "updated_at"
  498. t.boolean "superapp", default: false, null: false
  499. t.string "website"
  500. t.string "owner_type"
  501. t.bigint "owner_id"
  502. t.boolean "confidential", default: true, null: false
  503. t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type"
  504. t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true
  505. end
  506. create_table "pghero_space_stats", force: :cascade do |t|
  507. t.text "database"
  508. t.text "schema"
  509. t.text "relation"
  510. t.bigint "size"
  511. t.datetime "captured_at"
  512. t.index ["database", "captured_at"], name: "index_pghero_space_stats_on_database_and_captured_at"
  513. end
  514. create_table "poll_votes", force: :cascade do |t|
  515. t.bigint "account_id"
  516. t.bigint "poll_id"
  517. t.integer "choice", default: 0, null: false
  518. t.datetime "created_at", null: false
  519. t.datetime "updated_at", null: false
  520. t.string "uri"
  521. t.index ["account_id"], name: "index_poll_votes_on_account_id"
  522. t.index ["poll_id"], name: "index_poll_votes_on_poll_id"
  523. end
  524. create_table "polls", force: :cascade do |t|
  525. t.bigint "account_id"
  526. t.bigint "status_id"
  527. t.datetime "expires_at"
  528. t.string "options", default: [], null: false, array: true
  529. t.bigint "cached_tallies", default: [], null: false, array: true
  530. t.boolean "multiple", default: false, null: false
  531. t.boolean "hide_totals", default: false, null: false
  532. t.bigint "votes_count", default: 0, null: false
  533. t.datetime "last_fetched_at"
  534. t.datetime "created_at", null: false
  535. t.datetime "updated_at", null: false
  536. t.integer "lock_version", default: 0, null: false
  537. t.bigint "voters_count"
  538. t.index ["account_id"], name: "index_polls_on_account_id"
  539. t.index ["status_id"], name: "index_polls_on_status_id"
  540. end
  541. create_table "preview_cards", force: :cascade do |t|
  542. t.string "url", default: "", null: false
  543. t.string "title", default: "", null: false
  544. t.string "description", default: "", null: false
  545. t.string "image_file_name"
  546. t.string "image_content_type"
  547. t.integer "image_file_size"
  548. t.datetime "image_updated_at"
  549. t.integer "type", default: 0, null: false
  550. t.text "html", default: "", null: false
  551. t.string "author_name", default: "", null: false
  552. t.string "author_url", default: "", null: false
  553. t.string "provider_name", default: "", null: false
  554. t.string "provider_url", default: "", null: false
  555. t.integer "width", default: 0, null: false
  556. t.integer "height", default: 0, null: false
  557. t.datetime "created_at", null: false
  558. t.datetime "updated_at", null: false
  559. t.string "embed_url", default: "", null: false
  560. t.integer "image_storage_schema_version"
  561. t.index ["url"], name: "index_preview_cards_on_url", unique: true
  562. end
  563. create_table "preview_cards_statuses", id: false, force: :cascade do |t|
  564. t.bigint "preview_card_id", null: false
  565. t.bigint "status_id", null: false
  566. t.index ["status_id", "preview_card_id"], name: "index_preview_cards_statuses_on_status_id_and_preview_card_id"
  567. end
  568. create_table "relays", force: :cascade do |t|
  569. t.string "inbox_url", default: "", null: false
  570. t.string "follow_activity_id"
  571. t.datetime "created_at", null: false
  572. t.datetime "updated_at", null: false
  573. t.integer "state", default: 0, null: false
  574. end
  575. create_table "report_notes", force: :cascade do |t|
  576. t.text "content", null: false
  577. t.bigint "report_id", null: false
  578. t.bigint "account_id", null: false
  579. t.datetime "created_at", null: false
  580. t.datetime "updated_at", null: false
  581. t.index ["account_id"], name: "index_report_notes_on_account_id"
  582. t.index ["report_id"], name: "index_report_notes_on_report_id"
  583. end
  584. create_table "reports", force: :cascade do |t|
  585. t.bigint "status_ids", default: [], null: false, array: true
  586. t.text "comment", default: "", null: false
  587. t.boolean "action_taken", default: false, null: false
  588. t.datetime "created_at", null: false
  589. t.datetime "updated_at", null: false
  590. t.bigint "account_id", null: false
  591. t.bigint "action_taken_by_account_id"
  592. t.bigint "target_account_id", null: false
  593. t.bigint "assigned_account_id"
  594. t.string "uri"
  595. t.index ["account_id"], name: "index_reports_on_account_id"
  596. t.index ["target_account_id"], name: "index_reports_on_target_account_id"
  597. end
  598. create_table "scheduled_statuses", force: :cascade do |t|
  599. t.bigint "account_id"
  600. t.datetime "scheduled_at"
  601. t.jsonb "params"
  602. t.index ["account_id"], name: "index_scheduled_statuses_on_account_id"
  603. t.index ["scheduled_at"], name: "index_scheduled_statuses_on_scheduled_at"
  604. end
  605. create_table "session_activations", force: :cascade do |t|
  606. t.string "session_id", null: false
  607. t.datetime "created_at", null: false
  608. t.datetime "updated_at", null: false
  609. t.string "user_agent", default: "", null: false
  610. t.inet "ip"
  611. t.bigint "access_token_id"
  612. t.bigint "user_id", null: false
  613. t.bigint "web_push_subscription_id"
  614. t.index ["access_token_id"], name: "index_session_activations_on_access_token_id"
  615. t.index ["session_id"], name: "index_session_activations_on_session_id", unique: true
  616. t.index ["user_id"], name: "index_session_activations_on_user_id"
  617. end
  618. create_table "settings", force: :cascade do |t|
  619. t.string "var", null: false
  620. t.text "value"
  621. t.string "thing_type"
  622. t.datetime "created_at"
  623. t.datetime "updated_at"
  624. t.bigint "thing_id"
  625. t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true
  626. end
  627. create_table "site_uploads", force: :cascade do |t|
  628. t.string "var", default: "", null: false
  629. t.string "file_file_name"
  630. t.string "file_content_type"
  631. t.integer "file_file_size"
  632. t.datetime "file_updated_at"
  633. t.json "meta"
  634. t.datetime "created_at", null: false
  635. t.datetime "updated_at", null: false
  636. t.index ["var"], name: "index_site_uploads_on_var", unique: true
  637. end
  638. create_table "status_pins", force: :cascade do |t|
  639. t.bigint "account_id", null: false
  640. t.bigint "status_id", null: false
  641. t.datetime "created_at", default: -> { "now()" }, null: false
  642. t.datetime "updated_at", default: -> { "now()" }, null: false
  643. t.index ["account_id", "status_id"], name: "index_status_pins_on_account_id_and_status_id", unique: true
  644. end
  645. create_table "status_stats", force: :cascade do |t|
  646. t.bigint "status_id", null: false
  647. t.bigint "replies_count", default: 0, null: false
  648. t.bigint "reblogs_count", default: 0, null: false
  649. t.bigint "favourites_count", default: 0, null: false
  650. t.datetime "created_at", null: false
  651. t.datetime "updated_at", null: false
  652. t.index ["status_id"], name: "index_status_stats_on_status_id", unique: true
  653. end
  654. create_table "statuses", id: :bigint, default: -> { "timestamp_id('statuses'::text)" }, force: :cascade do |t|
  655. t.string "uri"
  656. t.text "text", default: "", null: false
  657. t.datetime "created_at", null: false
  658. t.datetime "updated_at", null: false
  659. t.bigint "in_reply_to_id"
  660. t.bigint "reblog_of_id"
  661. t.string "url"
  662. t.boolean "sensitive", default: false, null: false
  663. t.integer "visibility", default: 0, null: false
  664. t.text "spoiler_text", default: "", null: false
  665. t.boolean "reply", default: false, null: false
  666. t.string "language"
  667. t.bigint "conversation_id"
  668. t.boolean "local"
  669. t.bigint "account_id", null: false
  670. t.bigint "application_id"
  671. t.bigint "in_reply_to_account_id"
  672. t.bigint "poll_id"
  673. t.datetime "deleted_at"
  674. t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20190820", order: { id: :desc }, where: "(deleted_at IS NULL)"
  675. t.index ["id", "account_id"], name: "index_statuses_local_20190824", order: { id: :desc }, where: "((local OR (uri IS NULL)) AND (deleted_at IS NULL) AND (visibility = 0) AND (reblog_of_id IS NULL) AND ((NOT reply) OR (in_reply_to_account_id = account_id)))"
  676. t.index ["id", "account_id"], name: "index_statuses_public_20200119", order: { id: :desc }, where: "((deleted_at IS NULL) AND (visibility = 0) AND (reblog_of_id IS NULL) AND ((NOT reply) OR (in_reply_to_account_id = account_id)))"
  677. t.index ["in_reply_to_account_id"], name: "index_statuses_on_in_reply_to_account_id"
  678. t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id"
  679. t.index ["reblog_of_id", "account_id"], name: "index_statuses_on_reblog_of_id_and_account_id"
  680. t.index ["uri"], name: "index_statuses_on_uri", unique: true
  681. end
  682. create_table "statuses_tags", id: false, force: :cascade do |t|
  683. t.bigint "status_id", null: false
  684. t.bigint "tag_id", null: false
  685. t.index ["status_id"], name: "index_statuses_tags_on_status_id"
  686. t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true
  687. end
  688. create_table "tags", force: :cascade do |t|
  689. t.string "name", default: "", null: false
  690. t.datetime "created_at", null: false
  691. t.datetime "updated_at", null: false
  692. t.boolean "usable"
  693. t.boolean "trendable"
  694. t.boolean "listable"
  695. t.datetime "reviewed_at"
  696. t.datetime "requested_review_at"
  697. t.datetime "last_status_at"
  698. t.float "max_score"
  699. t.datetime "max_score_at"
  700. t.index "lower((name)::text)", name: "index_tags_on_name_lower", unique: true
  701. end
  702. create_table "tombstones", force: :cascade do |t|
  703. t.bigint "account_id"
  704. t.string "uri", null: false
  705. t.datetime "created_at", null: false
  706. t.datetime "updated_at", null: false
  707. t.boolean "by_moderator"
  708. t.index ["account_id"], name: "index_tombstones_on_account_id"
  709. t.index ["uri"], name: "index_tombstones_on_uri"
  710. end
  711. create_table "unavailable_domains", force: :cascade do |t|
  712. t.string "domain", default: "", null: false
  713. t.datetime "created_at", null: false
  714. t.datetime "updated_at", null: false
  715. t.index ["domain"], name: "index_unavailable_domains_on_domain", unique: true
  716. end
  717. create_table "user_invite_requests", force: :cascade do |t|
  718. t.bigint "user_id"
  719. t.text "text"
  720. t.datetime "created_at", null: false
  721. t.datetime "updated_at", null: false
  722. t.index ["user_id"], name: "index_user_invite_requests_on_user_id"
  723. end
  724. create_table "users", force: :cascade do |t|
  725. t.string "email", default: "", null: false
  726. t.datetime "created_at", null: false
  727. t.datetime "updated_at", null: false
  728. t.string "encrypted_password", default: "", null: false
  729. t.string "reset_password_token"
  730. t.datetime "reset_password_sent_at"
  731. t.datetime "remember_created_at"
  732. t.integer "sign_in_count", default: 0, null: false
  733. t.datetime "current_sign_in_at"
  734. t.datetime "last_sign_in_at"
  735. t.inet "current_sign_in_ip"
  736. t.inet "last_sign_in_ip"
  737. t.boolean "admin", default: false, null: false
  738. t.string "confirmation_token"
  739. t.datetime "confirmed_at"
  740. t.datetime "confirmation_sent_at"
  741. t.string "unconfirmed_email"
  742. t.string "locale"
  743. t.string "encrypted_otp_secret"
  744. t.string "encrypted_otp_secret_iv"
  745. t.string "encrypted_otp_secret_salt"
  746. t.integer "consumed_timestep"
  747. t.boolean "otp_required_for_login", default: false, null: false
  748. t.datetime "last_emailed_at"
  749. t.string "otp_backup_codes", array: true
  750. t.string "filtered_languages", default: [], null: false, array: true
  751. t.bigint "account_id", null: false
  752. t.boolean "disabled", default: false, null: false
  753. t.boolean "moderator", default: false, null: false
  754. t.bigint "invite_id"
  755. t.string "remember_token"
  756. t.string "chosen_languages", array: true
  757. t.bigint "created_by_application_id"
  758. t.boolean "approved", default: true, null: false
  759. t.index ["account_id"], name: "index_users_on_account_id"
  760. t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
  761. t.index ["created_by_application_id"], name: "index_users_on_created_by_application_id"
  762. t.index ["email"], name: "index_users_on_email", unique: true
  763. t.index ["remember_token"], name: "index_users_on_remember_token", unique: true
  764. t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
  765. end
  766. create_table "web_push_subscriptions", force: :cascade do |t|
  767. t.string "endpoint", null: false
  768. t.string "key_p256dh", null: false
  769. t.string "key_auth", null: false
  770. t.json "data"
  771. t.datetime "created_at", null: false
  772. t.datetime "updated_at", null: false
  773. t.bigint "access_token_id"
  774. t.bigint "user_id"
  775. t.index ["access_token_id"], name: "index_web_push_subscriptions_on_access_token_id"
  776. t.index ["user_id"], name: "index_web_push_subscriptions_on_user_id"
  777. end
  778. create_table "web_settings", force: :cascade do |t|
  779. t.json "data"
  780. t.datetime "created_at", null: false
  781. t.datetime "updated_at", null: false
  782. t.bigint "user_id", null: false
  783. t.index ["user_id"], name: "index_web_settings_on_user_id", unique: true
  784. end
  785. add_foreign_key "account_aliases", "accounts", on_delete: :cascade
  786. add_foreign_key "account_conversations", "accounts", on_delete: :cascade
  787. add_foreign_key "account_conversations", "conversations", on_delete: :cascade
  788. add_foreign_key "account_domain_blocks", "accounts", name: "fk_206c6029bd", on_delete: :cascade
  789. add_foreign_key "account_identity_proofs", "accounts", on_delete: :cascade
  790. add_foreign_key "account_migrations", "accounts", column: "target_account_id", on_delete: :nullify
  791. add_foreign_key "account_migrations", "accounts", on_delete: :cascade
  792. add_foreign_key "account_moderation_notes", "accounts"
  793. add_foreign_key "account_moderation_notes", "accounts", column: "target_account_id"
  794. add_foreign_key "account_pins", "accounts", column: "target_account_id", on_delete: :cascade
  795. add_foreign_key "account_pins", "accounts", on_delete: :cascade
  796. add_foreign_key "account_stats", "accounts", on_delete: :cascade
  797. add_foreign_key "account_tag_stats", "tags", on_delete: :cascade
  798. add_foreign_key "account_warnings", "accounts", column: "target_account_id", on_delete: :cascade
  799. add_foreign_key "account_warnings", "accounts", on_delete: :nullify
  800. add_foreign_key "accounts", "accounts", column: "moved_to_account_id", on_delete: :nullify
  801. add_foreign_key "admin_action_logs", "accounts", on_delete: :cascade
  802. add_foreign_key "announcement_mutes", "accounts", on_delete: :cascade
  803. add_foreign_key "announcement_mutes", "announcements", on_delete: :cascade
  804. add_foreign_key "announcement_reactions", "accounts", on_delete: :cascade
  805. add_foreign_key "announcement_reactions", "announcements", on_delete: :cascade
  806. add_foreign_key "announcement_reactions", "custom_emojis", on_delete: :cascade
  807. add_foreign_key "backups", "users", on_delete: :nullify
  808. add_foreign_key "blocks", "accounts", column: "target_account_id", name: "fk_9571bfabc1", on_delete: :cascade
  809. add_foreign_key "blocks", "accounts", name: "fk_4269e03e65", on_delete: :cascade
  810. add_foreign_key "bookmarks", "accounts", on_delete: :cascade
  811. add_foreign_key "bookmarks", "statuses", on_delete: :cascade
  812. add_foreign_key "conversation_mutes", "accounts", name: "fk_225b4212bb", on_delete: :cascade
  813. add_foreign_key "conversation_mutes", "conversations", on_delete: :cascade
  814. add_foreign_key "custom_filters", "accounts", on_delete: :cascade
  815. add_foreign_key "email_domain_blocks", "email_domain_blocks", column: "parent_id", on_delete: :cascade
  816. add_foreign_key "favourites", "accounts", name: "fk_5eb6c2b873", on_delete: :cascade
  817. add_foreign_key "favourites", "statuses", name: "fk_b0e856845e", on_delete: :cascade
  818. add_foreign_key "featured_tags", "accounts", on_delete: :cascade
  819. add_foreign_key "featured_tags", "tags", on_delete: :cascade
  820. add_foreign_key "follow_requests", "accounts", column: "target_account_id", name: "fk_9291ec025d", on_delete: :cascade
  821. add_foreign_key "follow_requests", "accounts", name: "fk_76d644b0e7", on_delete: :cascade
  822. add_foreign_key "follows", "accounts", column: "target_account_id", name: "fk_745ca29eac", on_delete: :cascade
  823. add_foreign_key "follows", "accounts", name: "fk_32ed1b5560", on_delete: :cascade
  824. add_foreign_key "identities", "users", name: "fk_bea040f377", on_delete: :cascade
  825. add_foreign_key "imports", "accounts", name: "fk_6db1b6e408", on_delete: :cascade
  826. add_foreign_key "invites", "users", on_delete: :cascade
  827. add_foreign_key "list_accounts", "accounts", on_delete: :cascade
  828. add_foreign_key "list_accounts", "follows", on_delete: :cascade
  829. add_foreign_key "list_accounts", "lists", on_delete: :cascade
  830. add_foreign_key "lists", "accounts", on_delete: :cascade
  831. add_foreign_key "markers", "users", on_delete: :cascade
  832. add_foreign_key "media_attachments", "accounts", name: "fk_96dd81e81b", on_delete: :nullify
  833. add_foreign_key "media_attachments", "scheduled_statuses", on_delete: :nullify
  834. add_foreign_key "media_attachments", "statuses", on_delete: :nullify
  835. add_foreign_key "mentions", "accounts", name: "fk_970d43f9d1", on_delete: :cascade
  836. add_foreign_key "mentions", "statuses", on_delete: :cascade
  837. add_foreign_key "mutes", "accounts", column: "target_account_id", name: "fk_eecff219ea", on_delete: :cascade
  838. add_foreign_key "mutes", "accounts", name: "fk_b8d8daf315", on_delete: :cascade
  839. add_foreign_key "notifications", "accounts", column: "from_account_id", name: "fk_fbd6b0bf9e", on_delete: :cascade
  840. add_foreign_key "notifications", "accounts", name: "fk_c141c8ee55", on_delete: :cascade
  841. add_foreign_key "oauth_access_grants", "oauth_applications", column: "application_id", name: "fk_34d54b0a33", on_delete: :cascade
  842. add_foreign_key "oauth_access_grants", "users", column: "resource_owner_id", name: "fk_63b044929b", on_delete: :cascade
  843. add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id", name: "fk_f5fc4c1ee3", on_delete: :cascade
  844. add_foreign_key "oauth_access_tokens", "users", column: "resource_owner_id", name: "fk_e84df68546", on_delete: :cascade
  845. add_foreign_key "oauth_applications", "users", column: "owner_id", name: "fk_b0988c7c0a", on_delete: :cascade
  846. add_foreign_key "poll_votes", "accounts", on_delete: :cascade
  847. add_foreign_key "poll_votes", "polls", on_delete: :cascade
  848. add_foreign_key "polls", "accounts", on_delete: :cascade
  849. add_foreign_key "polls", "statuses", on_delete: :cascade
  850. add_foreign_key "report_notes", "accounts", on_delete: :cascade
  851. add_foreign_key "report_notes", "reports", on_delete: :cascade
  852. add_foreign_key "reports", "accounts", column: "action_taken_by_account_id", name: "fk_bca45b75fd", on_delete: :nullify
  853. add_foreign_key "reports", "accounts", column: "assigned_account_id", on_delete: :nullify
  854. add_foreign_key "reports", "accounts", column: "target_account_id", name: "fk_eb37af34f0", on_delete: :cascade
  855. add_foreign_key "reports", "accounts", name: "fk_4b81f7522c", on_delete: :cascade
  856. add_foreign_key "scheduled_statuses", "accounts", on_delete: :cascade
  857. add_foreign_key "session_activations", "oauth_access_tokens", column: "access_token_id", name: "fk_957e5bda89", on_delete: :cascade
  858. add_foreign_key "session_activations", "users", name: "fk_e5fda67334", on_delete: :cascade
  859. add_foreign_key "status_pins", "accounts", name: "fk_d4cb435b62", on_delete: :cascade
  860. add_foreign_key "status_pins", "statuses", on_delete: :cascade
  861. add_foreign_key "status_stats", "statuses", on_delete: :cascade
  862. add_foreign_key "statuses", "accounts", column: "in_reply_to_account_id", name: "fk_c7fa917661", on_delete: :nullify
  863. add_foreign_key "statuses", "accounts", name: "fk_9bda1543f7", on_delete: :cascade
  864. add_foreign_key "statuses", "statuses", column: "in_reply_to_id", on_delete: :nullify
  865. add_foreign_key "statuses", "statuses", column: "reblog_of_id", on_delete: :cascade
  866. add_foreign_key "statuses_tags", "statuses", on_delete: :cascade
  867. add_foreign_key "statuses_tags", "tags", name: "fk_3081861e21", on_delete: :cascade
  868. add_foreign_key "tombstones", "accounts", on_delete: :cascade
  869. add_foreign_key "user_invite_requests", "users", on_delete: :cascade
  870. add_foreign_key "users", "accounts", name: "fk_50500f500d", on_delete: :cascade
  871. add_foreign_key "users", "invites", on_delete: :nullify
  872. add_foreign_key "users", "oauth_applications", column: "created_by_application_id", on_delete: :nullify
  873. add_foreign_key "web_push_subscriptions", "oauth_access_tokens", column: "access_token_id", on_delete: :cascade
  874. add_foreign_key "web_push_subscriptions", "users", on_delete: :cascade
  875. add_foreign_key "web_settings", "users", name: "fk_11910667b2", on_delete: :cascade
  876. end