logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

schema.rb (28283B)


  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: 2018_04_10_204633) do
  13. # These are extensions that must be enabled in order to support this database
  14. enable_extension "pg_stat_statements"
  15. enable_extension "plpgsql"
  16. create_table "account_domain_blocks", force: :cascade do |t|
  17. t.string "domain"
  18. t.datetime "created_at", null: false
  19. t.datetime "updated_at", null: false
  20. t.bigint "account_id"
  21. t.index ["account_id", "domain"], name: "index_account_domain_blocks_on_account_id_and_domain", unique: true
  22. end
  23. create_table "account_moderation_notes", force: :cascade do |t|
  24. t.text "content", null: false
  25. t.bigint "account_id", null: false
  26. t.bigint "target_account_id", null: false
  27. t.datetime "created_at", null: false
  28. t.datetime "updated_at", null: false
  29. t.index ["account_id"], name: "index_account_moderation_notes_on_account_id"
  30. t.index ["target_account_id"], name: "index_account_moderation_notes_on_target_account_id"
  31. end
  32. create_table "accounts", force: :cascade do |t|
  33. t.string "username", default: "", null: false
  34. t.string "domain"
  35. t.string "secret", default: "", null: false
  36. t.text "private_key"
  37. t.text "public_key", default: "", null: false
  38. t.string "remote_url", default: "", null: false
  39. t.string "salmon_url", default: "", null: false
  40. t.string "hub_url", default: "", null: false
  41. t.datetime "created_at", null: false
  42. t.datetime "updated_at", null: false
  43. t.text "note", default: "", null: false
  44. t.string "display_name", default: "", null: false
  45. t.string "uri", default: "", null: false
  46. t.string "url"
  47. t.string "avatar_file_name"
  48. t.string "avatar_content_type"
  49. t.integer "avatar_file_size"
  50. t.datetime "avatar_updated_at"
  51. t.string "header_file_name"
  52. t.string "header_content_type"
  53. t.integer "header_file_size"
  54. t.datetime "header_updated_at"
  55. t.string "avatar_remote_url"
  56. t.datetime "subscription_expires_at"
  57. t.boolean "silenced", default: false, null: false
  58. t.boolean "suspended", default: false, null: false
  59. t.boolean "locked", default: false, null: false
  60. t.string "header_remote_url", default: "", null: false
  61. t.integer "statuses_count", default: 0, null: false
  62. t.integer "followers_count", default: 0, null: false
  63. t.integer "following_count", default: 0, null: false
  64. t.datetime "last_webfingered_at"
  65. t.string "inbox_url", default: "", null: false
  66. t.string "outbox_url", default: "", null: false
  67. t.string "shared_inbox_url", default: "", null: false
  68. t.string "followers_url", default: "", null: false
  69. t.integer "protocol", default: 0, null: false
  70. t.boolean "memorial", default: false, null: false
  71. t.bigint "moved_to_account_id"
  72. t.string "featured_collection_url"
  73. t.jsonb "fields"
  74. 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
  75. t.index "lower((username)::text), lower((domain)::text)", name: "index_accounts_on_username_and_domain_lower"
  76. t.index ["uri"], name: "index_accounts_on_uri"
  77. t.index ["url"], name: "index_accounts_on_url"
  78. t.index ["username", "domain"], name: "index_accounts_on_username_and_domain", unique: true
  79. end
  80. create_table "admin_action_logs", force: :cascade do |t|
  81. t.bigint "account_id"
  82. t.string "action", default: "", null: false
  83. t.string "target_type"
  84. t.bigint "target_id"
  85. t.text "recorded_changes", default: "", null: false
  86. t.datetime "created_at", null: false
  87. t.datetime "updated_at", null: false
  88. t.index ["account_id"], name: "index_admin_action_logs_on_account_id"
  89. t.index ["target_type", "target_id"], name: "index_admin_action_logs_on_target_type_and_target_id"
  90. end
  91. create_table "backups", force: :cascade do |t|
  92. t.bigint "user_id"
  93. t.string "dump_file_name"
  94. t.string "dump_content_type"
  95. t.integer "dump_file_size"
  96. t.datetime "dump_updated_at"
  97. t.boolean "processed", default: false, null: false
  98. t.datetime "created_at", null: false
  99. t.datetime "updated_at", null: false
  100. t.index ["user_id"], name: "index_backups_on_user_id"
  101. end
  102. create_table "blocks", force: :cascade do |t|
  103. t.datetime "created_at", null: false
  104. t.datetime "updated_at", null: false
  105. t.bigint "account_id", null: false
  106. t.bigint "target_account_id", null: false
  107. t.index ["account_id", "target_account_id"], name: "index_blocks_on_account_id_and_target_account_id", unique: true
  108. end
  109. create_table "conversation_mutes", force: :cascade do |t|
  110. t.bigint "conversation_id", null: false
  111. t.bigint "account_id", null: false
  112. t.index ["account_id", "conversation_id"], name: "index_conversation_mutes_on_account_id_and_conversation_id", unique: true
  113. end
  114. create_table "conversations", force: :cascade do |t|
  115. t.string "uri"
  116. t.datetime "created_at", null: false
  117. t.datetime "updated_at", null: false
  118. t.index ["uri"], name: "index_conversations_on_uri", unique: true
  119. end
  120. create_table "custom_emojis", force: :cascade do |t|
  121. t.string "shortcode", default: "", null: false
  122. t.string "domain"
  123. t.string "image_file_name"
  124. t.string "image_content_type"
  125. t.integer "image_file_size"
  126. t.datetime "image_updated_at"
  127. t.datetime "created_at", null: false
  128. t.datetime "updated_at", null: false
  129. t.boolean "disabled", default: false, null: false
  130. t.string "uri"
  131. t.string "image_remote_url"
  132. t.boolean "visible_in_picker", default: true, null: false
  133. t.index ["shortcode", "domain"], name: "index_custom_emojis_on_shortcode_and_domain", unique: true
  134. end
  135. create_table "domain_blocks", force: :cascade do |t|
  136. t.string "domain", default: "", null: false
  137. t.datetime "created_at", null: false
  138. t.datetime "updated_at", null: false
  139. t.integer "severity", default: 0
  140. t.boolean "reject_media", default: false, null: false
  141. t.index ["domain"], name: "index_domain_blocks_on_domain", unique: true
  142. end
  143. create_table "email_domain_blocks", force: :cascade do |t|
  144. t.string "domain", default: "", null: false
  145. t.datetime "created_at", null: false
  146. t.datetime "updated_at", null: false
  147. t.index ["domain"], name: "index_email_domain_blocks_on_domain", unique: true
  148. end
  149. create_table "favourites", force: :cascade do |t|
  150. t.datetime "created_at", null: false
  151. t.datetime "updated_at", null: false
  152. t.bigint "account_id", null: false
  153. t.bigint "status_id", null: false
  154. t.index ["account_id", "id"], name: "index_favourites_on_account_id_and_id"
  155. t.index ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true
  156. t.index ["status_id"], name: "index_favourites_on_status_id"
  157. end
  158. create_table "follow_requests", force: :cascade do |t|
  159. t.datetime "created_at", null: false
  160. t.datetime "updated_at", null: false
  161. t.bigint "account_id", null: false
  162. t.bigint "target_account_id", null: false
  163. t.boolean "show_reblogs", default: true, null: false
  164. t.index ["account_id", "target_account_id"], name: "index_follow_requests_on_account_id_and_target_account_id", unique: true
  165. end
  166. create_table "follows", force: :cascade do |t|
  167. t.datetime "created_at", null: false
  168. t.datetime "updated_at", null: false
  169. t.bigint "account_id", null: false
  170. t.bigint "target_account_id", null: false
  171. t.boolean "show_reblogs", default: true, null: false
  172. t.index ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true
  173. end
  174. create_table "identities", id: :serial, force: :cascade do |t|
  175. t.integer "user_id"
  176. t.string "provider", default: "", null: false
  177. t.string "uid", default: "", null: false
  178. t.datetime "created_at", null: false
  179. t.datetime "updated_at", null: false
  180. t.index ["user_id"], name: "index_identities_on_user_id"
  181. end
  182. create_table "imports", force: :cascade do |t|
  183. t.integer "type", null: false
  184. t.boolean "approved", default: false, null: false
  185. t.datetime "created_at", null: false
  186. t.datetime "updated_at", null: false
  187. t.string "data_file_name"
  188. t.string "data_content_type"
  189. t.integer "data_file_size"
  190. t.datetime "data_updated_at"
  191. t.bigint "account_id", null: false
  192. end
  193. create_table "invites", force: :cascade do |t|
  194. t.bigint "user_id", null: false
  195. t.string "code", default: "", null: false
  196. t.datetime "expires_at"
  197. t.integer "max_uses"
  198. t.integer "uses", default: 0, null: false
  199. t.datetime "created_at", null: false
  200. t.datetime "updated_at", null: false
  201. t.index ["code"], name: "index_invites_on_code", unique: true
  202. t.index ["user_id"], name: "index_invites_on_user_id"
  203. end
  204. create_table "list_accounts", force: :cascade do |t|
  205. t.bigint "list_id", null: false
  206. t.bigint "account_id", null: false
  207. t.bigint "follow_id", null: false
  208. t.index ["account_id", "list_id"], name: "index_list_accounts_on_account_id_and_list_id", unique: true
  209. t.index ["follow_id"], name: "index_list_accounts_on_follow_id"
  210. t.index ["list_id", "account_id"], name: "index_list_accounts_on_list_id_and_account_id"
  211. end
  212. create_table "lists", force: :cascade do |t|
  213. t.bigint "account_id", null: false
  214. t.string "title", default: "", null: false
  215. t.datetime "created_at", null: false
  216. t.datetime "updated_at", null: false
  217. t.index ["account_id"], name: "index_lists_on_account_id"
  218. end
  219. create_table "media_attachments", force: :cascade do |t|
  220. t.bigint "status_id"
  221. t.string "file_file_name"
  222. t.string "file_content_type"
  223. t.integer "file_file_size"
  224. t.datetime "file_updated_at"
  225. t.string "remote_url", default: "", null: false
  226. t.datetime "created_at", null: false
  227. t.datetime "updated_at", null: false
  228. t.string "shortcode"
  229. t.integer "type", default: 0, null: false
  230. t.json "file_meta"
  231. t.bigint "account_id"
  232. t.text "description"
  233. t.index ["account_id"], name: "index_media_attachments_on_account_id"
  234. t.index ["shortcode"], name: "index_media_attachments_on_shortcode", unique: true
  235. t.index ["status_id"], name: "index_media_attachments_on_status_id"
  236. end
  237. create_table "mentions", force: :cascade do |t|
  238. t.bigint "status_id"
  239. t.datetime "created_at", null: false
  240. t.datetime "updated_at", null: false
  241. t.bigint "account_id"
  242. t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true
  243. t.index ["status_id"], name: "index_mentions_on_status_id"
  244. end
  245. create_table "mutes", force: :cascade do |t|
  246. t.datetime "created_at", null: false
  247. t.datetime "updated_at", null: false
  248. t.bigint "account_id", null: false
  249. t.bigint "target_account_id", null: false
  250. t.boolean "hide_notifications", default: true, null: false
  251. t.index ["account_id", "target_account_id"], name: "index_mutes_on_account_id_and_target_account_id", unique: true
  252. end
  253. create_table "notifications", force: :cascade do |t|
  254. t.bigint "activity_id", null: false
  255. t.string "activity_type", null: false
  256. t.datetime "created_at", null: false
  257. t.datetime "updated_at", null: false
  258. t.bigint "account_id", null: false
  259. t.bigint "from_account_id", null: false
  260. t.index ["account_id", "activity_id", "activity_type"], name: "account_activity", unique: true
  261. t.index ["account_id", "id"], name: "index_notifications_on_account_id_and_id", order: { id: :desc }
  262. t.index ["activity_id", "activity_type"], name: "index_notifications_on_activity_id_and_activity_type"
  263. end
  264. create_table "oauth_access_grants", force: :cascade do |t|
  265. t.string "token", null: false
  266. t.integer "expires_in", null: false
  267. t.text "redirect_uri", null: false
  268. t.datetime "created_at", null: false
  269. t.datetime "revoked_at"
  270. t.string "scopes"
  271. t.bigint "application_id", null: false
  272. t.bigint "resource_owner_id", null: false
  273. t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true
  274. end
  275. create_table "oauth_access_tokens", force: :cascade do |t|
  276. t.string "token", null: false
  277. t.string "refresh_token"
  278. t.integer "expires_in"
  279. t.datetime "revoked_at"
  280. t.datetime "created_at", null: false
  281. t.string "scopes"
  282. t.bigint "application_id"
  283. t.bigint "resource_owner_id"
  284. t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true
  285. t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id"
  286. t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true
  287. end
  288. create_table "oauth_applications", force: :cascade do |t|
  289. t.string "name", null: false
  290. t.string "uid", null: false
  291. t.string "secret", null: false
  292. t.text "redirect_uri", null: false
  293. t.string "scopes", default: "", null: false
  294. t.datetime "created_at"
  295. t.datetime "updated_at"
  296. t.boolean "superapp", default: false, null: false
  297. t.string "website"
  298. t.string "owner_type"
  299. t.bigint "owner_id"
  300. t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type"
  301. t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true
  302. end
  303. create_table "preview_cards", force: :cascade do |t|
  304. t.string "url", default: "", null: false
  305. t.string "title", default: "", null: false
  306. t.string "description", default: "", null: false
  307. t.string "image_file_name"
  308. t.string "image_content_type"
  309. t.integer "image_file_size"
  310. t.datetime "image_updated_at"
  311. t.integer "type", default: 0, null: false
  312. t.text "html", default: "", null: false
  313. t.string "author_name", default: "", null: false
  314. t.string "author_url", default: "", null: false
  315. t.string "provider_name", default: "", null: false
  316. t.string "provider_url", default: "", null: false
  317. t.integer "width", default: 0, null: false
  318. t.integer "height", default: 0, null: false
  319. t.datetime "created_at", null: false
  320. t.datetime "updated_at", null: false
  321. t.string "embed_url", default: "", null: false
  322. t.index ["url"], name: "index_preview_cards_on_url", unique: true
  323. end
  324. create_table "preview_cards_statuses", id: false, force: :cascade do |t|
  325. t.bigint "preview_card_id", null: false
  326. t.bigint "status_id", null: false
  327. t.index ["status_id", "preview_card_id"], name: "index_preview_cards_statuses_on_status_id_and_preview_card_id"
  328. end
  329. create_table "report_notes", force: :cascade do |t|
  330. t.text "content", null: false
  331. t.bigint "report_id", null: false
  332. t.bigint "account_id", null: false
  333. t.datetime "created_at", null: false
  334. t.datetime "updated_at", null: false
  335. t.index ["account_id"], name: "index_report_notes_on_account_id"
  336. t.index ["report_id"], name: "index_report_notes_on_report_id"
  337. end
  338. create_table "reports", force: :cascade do |t|
  339. t.bigint "status_ids", default: [], null: false, array: true
  340. t.text "comment", default: "", null: false
  341. t.boolean "action_taken", default: false, null: false
  342. t.datetime "created_at", null: false
  343. t.datetime "updated_at", null: false
  344. t.bigint "account_id", null: false
  345. t.bigint "action_taken_by_account_id"
  346. t.bigint "target_account_id", null: false
  347. t.bigint "assigned_account_id"
  348. t.index ["account_id"], name: "index_reports_on_account_id"
  349. t.index ["target_account_id"], name: "index_reports_on_target_account_id"
  350. end
  351. create_table "session_activations", force: :cascade do |t|
  352. t.string "session_id", null: false
  353. t.datetime "created_at", null: false
  354. t.datetime "updated_at", null: false
  355. t.string "user_agent", default: "", null: false
  356. t.inet "ip"
  357. t.bigint "access_token_id"
  358. t.bigint "user_id", null: false
  359. t.bigint "web_push_subscription_id"
  360. t.index ["session_id"], name: "index_session_activations_on_session_id", unique: true
  361. t.index ["user_id"], name: "index_session_activations_on_user_id"
  362. end
  363. create_table "settings", force: :cascade do |t|
  364. t.string "var", null: false
  365. t.text "value"
  366. t.string "thing_type"
  367. t.datetime "created_at"
  368. t.datetime "updated_at"
  369. t.bigint "thing_id"
  370. t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true
  371. end
  372. create_table "site_uploads", force: :cascade do |t|
  373. t.string "var", default: "", null: false
  374. t.string "file_file_name"
  375. t.string "file_content_type"
  376. t.integer "file_file_size"
  377. t.datetime "file_updated_at"
  378. t.json "meta"
  379. t.datetime "created_at", null: false
  380. t.datetime "updated_at", null: false
  381. t.index ["var"], name: "index_site_uploads_on_var", unique: true
  382. end
  383. create_table "status_pins", force: :cascade do |t|
  384. t.bigint "account_id", null: false
  385. t.bigint "status_id", null: false
  386. t.datetime "created_at", default: -> { "now()" }, null: false
  387. t.datetime "updated_at", default: -> { "now()" }, null: false
  388. t.index ["account_id", "status_id"], name: "index_status_pins_on_account_id_and_status_id", unique: true
  389. end
  390. create_table "statuses", id: :bigint, default: -> { "timestamp_id('statuses'::text)" }, force: :cascade do |t|
  391. t.string "uri"
  392. t.text "text", default: "", null: false
  393. t.datetime "created_at", null: false
  394. t.datetime "updated_at", null: false
  395. t.bigint "in_reply_to_id"
  396. t.bigint "reblog_of_id"
  397. t.string "url"
  398. t.boolean "sensitive", default: false, null: false
  399. t.integer "visibility", default: 0, null: false
  400. t.text "spoiler_text", default: "", null: false
  401. t.boolean "reply", default: false, null: false
  402. t.integer "favourites_count", default: 0, null: false
  403. t.integer "reblogs_count", default: 0, null: false
  404. t.string "language"
  405. t.bigint "conversation_id"
  406. t.boolean "local"
  407. t.bigint "account_id", null: false
  408. t.bigint "application_id"
  409. t.bigint "in_reply_to_account_id"
  410. t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20180106", order: { id: :desc }
  411. t.index ["conversation_id"], name: "index_statuses_on_conversation_id"
  412. t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id"
  413. t.index ["reblog_of_id", "account_id"], name: "index_statuses_on_reblog_of_id_and_account_id"
  414. t.index ["uri"], name: "index_statuses_on_uri", unique: true
  415. end
  416. create_table "statuses_tags", id: false, force: :cascade do |t|
  417. t.bigint "status_id", null: false
  418. t.bigint "tag_id", null: false
  419. t.index ["status_id"], name: "index_statuses_tags_on_status_id"
  420. t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true
  421. end
  422. create_table "stream_entries", force: :cascade do |t|
  423. t.bigint "activity_id"
  424. t.string "activity_type"
  425. t.datetime "created_at", null: false
  426. t.datetime "updated_at", null: false
  427. t.boolean "hidden", default: false, null: false
  428. t.bigint "account_id"
  429. t.index ["account_id", "activity_type", "id"], name: "index_stream_entries_on_account_id_and_activity_type_and_id"
  430. t.index ["activity_id", "activity_type"], name: "index_stream_entries_on_activity_id_and_activity_type"
  431. end
  432. create_table "subscriptions", force: :cascade do |t|
  433. t.string "callback_url", default: "", null: false
  434. t.string "secret"
  435. t.datetime "expires_at"
  436. t.boolean "confirmed", default: false, null: false
  437. t.datetime "created_at", null: false
  438. t.datetime "updated_at", null: false
  439. t.datetime "last_successful_delivery_at"
  440. t.string "domain"
  441. t.bigint "account_id", null: false
  442. t.index ["account_id", "callback_url"], name: "index_subscriptions_on_account_id_and_callback_url", unique: true
  443. end
  444. create_table "tags", force: :cascade do |t|
  445. t.string "name", default: "", null: false
  446. t.datetime "created_at", null: false
  447. t.datetime "updated_at", null: false
  448. t.index "lower((name)::text) text_pattern_ops", name: "hashtag_search_index"
  449. t.index ["name"], name: "index_tags_on_name", unique: true
  450. end
  451. create_table "users", force: :cascade do |t|
  452. t.string "email", default: "", null: false
  453. t.datetime "created_at", null: false
  454. t.datetime "updated_at", null: false
  455. t.string "encrypted_password", default: "", null: false
  456. t.string "reset_password_token"
  457. t.datetime "reset_password_sent_at"
  458. t.datetime "remember_created_at"
  459. t.integer "sign_in_count", default: 0, null: false
  460. t.datetime "current_sign_in_at"
  461. t.datetime "last_sign_in_at"
  462. t.inet "current_sign_in_ip"
  463. t.inet "last_sign_in_ip"
  464. t.boolean "admin", default: false, null: false
  465. t.string "confirmation_token"
  466. t.datetime "confirmed_at"
  467. t.datetime "confirmation_sent_at"
  468. t.string "unconfirmed_email"
  469. t.string "locale"
  470. t.string "encrypted_otp_secret"
  471. t.string "encrypted_otp_secret_iv"
  472. t.string "encrypted_otp_secret_salt"
  473. t.integer "consumed_timestep"
  474. t.boolean "otp_required_for_login", default: false, null: false
  475. t.datetime "last_emailed_at"
  476. t.string "otp_backup_codes", array: true
  477. t.string "filtered_languages", default: [], null: false, array: true
  478. t.bigint "account_id", null: false
  479. t.boolean "disabled", default: false, null: false
  480. t.boolean "moderator", default: false, null: false
  481. t.bigint "invite_id"
  482. t.string "remember_token"
  483. t.index ["account_id"], name: "index_users_on_account_id"
  484. t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
  485. t.index ["email"], name: "index_users_on_email", unique: true
  486. t.index ["filtered_languages"], name: "index_users_on_filtered_languages", using: :gin
  487. t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
  488. end
  489. create_table "web_push_subscriptions", force: :cascade do |t|
  490. t.string "endpoint", null: false
  491. t.string "key_p256dh", null: false
  492. t.string "key_auth", null: false
  493. t.json "data"
  494. t.datetime "created_at", null: false
  495. t.datetime "updated_at", null: false
  496. end
  497. create_table "web_settings", force: :cascade do |t|
  498. t.json "data"
  499. t.datetime "created_at", null: false
  500. t.datetime "updated_at", null: false
  501. t.bigint "user_id", null: false
  502. t.index ["user_id"], name: "index_web_settings_on_user_id", unique: true
  503. end
  504. add_foreign_key "account_domain_blocks", "accounts", name: "fk_206c6029bd", on_delete: :cascade
  505. add_foreign_key "account_moderation_notes", "accounts"
  506. add_foreign_key "account_moderation_notes", "accounts", column: "target_account_id"
  507. add_foreign_key "accounts", "accounts", column: "moved_to_account_id", on_delete: :nullify
  508. add_foreign_key "admin_action_logs", "accounts", on_delete: :cascade
  509. add_foreign_key "backups", "users", on_delete: :nullify
  510. add_foreign_key "blocks", "accounts", column: "target_account_id", name: "fk_9571bfabc1", on_delete: :cascade
  511. add_foreign_key "blocks", "accounts", name: "fk_4269e03e65", on_delete: :cascade
  512. add_foreign_key "conversation_mutes", "accounts", name: "fk_225b4212bb", on_delete: :cascade
  513. add_foreign_key "conversation_mutes", "conversations", on_delete: :cascade
  514. add_foreign_key "favourites", "accounts", name: "fk_5eb6c2b873", on_delete: :cascade
  515. add_foreign_key "favourites", "statuses", name: "fk_b0e856845e", on_delete: :cascade
  516. add_foreign_key "follow_requests", "accounts", column: "target_account_id", name: "fk_9291ec025d", on_delete: :cascade
  517. add_foreign_key "follow_requests", "accounts", name: "fk_76d644b0e7", on_delete: :cascade
  518. add_foreign_key "follows", "accounts", column: "target_account_id", name: "fk_745ca29eac", on_delete: :cascade
  519. add_foreign_key "follows", "accounts", name: "fk_32ed1b5560", on_delete: :cascade
  520. add_foreign_key "identities", "users", on_delete: :cascade
  521. add_foreign_key "imports", "accounts", name: "fk_6db1b6e408", on_delete: :cascade
  522. add_foreign_key "invites", "users", on_delete: :cascade
  523. add_foreign_key "list_accounts", "accounts", on_delete: :cascade
  524. add_foreign_key "list_accounts", "follows", on_delete: :cascade
  525. add_foreign_key "list_accounts", "lists", on_delete: :cascade
  526. add_foreign_key "lists", "accounts", on_delete: :cascade
  527. add_foreign_key "media_attachments", "accounts", name: "fk_96dd81e81b", on_delete: :nullify
  528. add_foreign_key "media_attachments", "statuses", on_delete: :nullify
  529. add_foreign_key "mentions", "accounts", name: "fk_970d43f9d1", on_delete: :cascade
  530. add_foreign_key "mentions", "statuses", on_delete: :cascade
  531. add_foreign_key "mutes", "accounts", column: "target_account_id", name: "fk_eecff219ea", on_delete: :cascade
  532. add_foreign_key "mutes", "accounts", name: "fk_b8d8daf315", on_delete: :cascade
  533. add_foreign_key "notifications", "accounts", column: "from_account_id", name: "fk_fbd6b0bf9e", on_delete: :cascade
  534. add_foreign_key "notifications", "accounts", name: "fk_c141c8ee55", on_delete: :cascade
  535. add_foreign_key "oauth_access_grants", "oauth_applications", column: "application_id", name: "fk_34d54b0a33", on_delete: :cascade
  536. add_foreign_key "oauth_access_grants", "users", column: "resource_owner_id", name: "fk_63b044929b", on_delete: :cascade
  537. add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id", name: "fk_f5fc4c1ee3", on_delete: :cascade
  538. add_foreign_key "oauth_access_tokens", "users", column: "resource_owner_id", name: "fk_e84df68546", on_delete: :cascade
  539. add_foreign_key "oauth_applications", "users", column: "owner_id", name: "fk_b0988c7c0a", on_delete: :cascade
  540. add_foreign_key "report_notes", "accounts", on_delete: :cascade
  541. add_foreign_key "report_notes", "reports", on_delete: :cascade
  542. add_foreign_key "reports", "accounts", column: "action_taken_by_account_id", name: "fk_bca45b75fd", on_delete: :nullify
  543. add_foreign_key "reports", "accounts", column: "assigned_account_id", on_delete: :nullify
  544. add_foreign_key "reports", "accounts", column: "target_account_id", name: "fk_eb37af34f0", on_delete: :cascade
  545. add_foreign_key "reports", "accounts", name: "fk_4b81f7522c", on_delete: :cascade
  546. add_foreign_key "session_activations", "oauth_access_tokens", column: "access_token_id", name: "fk_957e5bda89", on_delete: :cascade
  547. add_foreign_key "session_activations", "users", name: "fk_e5fda67334", on_delete: :cascade
  548. add_foreign_key "status_pins", "accounts", name: "fk_d4cb435b62", on_delete: :cascade
  549. add_foreign_key "status_pins", "statuses", on_delete: :cascade
  550. add_foreign_key "statuses", "accounts", column: "in_reply_to_account_id", name: "fk_c7fa917661", on_delete: :nullify
  551. add_foreign_key "statuses", "accounts", name: "fk_9bda1543f7", on_delete: :cascade
  552. add_foreign_key "statuses", "statuses", column: "in_reply_to_id", on_delete: :nullify
  553. add_foreign_key "statuses", "statuses", column: "reblog_of_id", on_delete: :cascade
  554. add_foreign_key "statuses_tags", "statuses", on_delete: :cascade
  555. add_foreign_key "statuses_tags", "tags", name: "fk_3081861e21", on_delete: :cascade
  556. add_foreign_key "stream_entries", "accounts", name: "fk_5659b17554", on_delete: :cascade
  557. add_foreign_key "subscriptions", "accounts", name: "fk_9847d1cbb5", on_delete: :cascade
  558. add_foreign_key "users", "accounts", name: "fk_50500f500d", on_delete: :cascade
  559. add_foreign_key "users", "invites", on_delete: :nullify
  560. add_foreign_key "web_settings", "users", name: "fk_11910667b2", on_delete: :cascade
  561. end