The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

221 lines
9.9 KiB

  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: 20161122163057) do
  13. # These are extensions that must be enabled in order to support this database
  14. enable_extension "plpgsql"
  15. create_table "accounts", force: :cascade do |t|
  16. t.string "username", default: "", null: false
  17. t.string "domain"
  18. t.string "secret", default: "", null: false
  19. t.text "private_key"
  20. t.text "public_key", default: "", null: false
  21. t.string "remote_url", default: "", null: false
  22. t.string "salmon_url", default: "", null: false
  23. t.string "hub_url", default: "", null: false
  24. t.datetime "created_at", null: false
  25. t.datetime "updated_at", null: false
  26. t.text "note", default: "", null: false
  27. t.string "display_name", default: "", null: false
  28. t.string "uri", default: "", null: false
  29. t.string "url"
  30. t.string "avatar_file_name"
  31. t.string "avatar_content_type"
  32. t.integer "avatar_file_size"
  33. t.datetime "avatar_updated_at"
  34. t.string "header_file_name"
  35. t.string "header_content_type"
  36. t.integer "header_file_size"
  37. t.datetime "header_updated_at"
  38. t.string "avatar_remote_url"
  39. t.datetime "subscription_expires_at"
  40. t.boolean "silenced", default: false, null: false
  41. t.index ["username", "domain"], name: "index_accounts_on_username_and_domain", unique: true, using: :btree
  42. end
  43. create_table "blocks", force: :cascade do |t|
  44. t.integer "account_id", null: false
  45. t.integer "target_account_id", null: false
  46. t.datetime "created_at", null: false
  47. t.datetime "updated_at", null: false
  48. t.index ["account_id", "target_account_id"], name: "index_blocks_on_account_id_and_target_account_id", unique: true, using: :btree
  49. end
  50. create_table "domain_blocks", force: :cascade do |t|
  51. t.string "domain", default: "", null: false
  52. t.datetime "created_at", null: false
  53. t.datetime "updated_at", null: false
  54. t.index ["domain"], name: "index_domain_blocks_on_domain", unique: true, using: :btree
  55. end
  56. create_table "favourites", force: :cascade do |t|
  57. t.integer "account_id", null: false
  58. t.integer "status_id", null: false
  59. t.datetime "created_at", null: false
  60. t.datetime "updated_at", null: false
  61. t.index ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true, using: :btree
  62. end
  63. create_table "follows", force: :cascade do |t|
  64. t.integer "account_id", null: false
  65. t.integer "target_account_id", null: false
  66. t.datetime "created_at", null: false
  67. t.datetime "updated_at", null: false
  68. t.index ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true, using: :btree
  69. end
  70. create_table "media_attachments", force: :cascade do |t|
  71. t.integer "status_id"
  72. t.string "file_file_name"
  73. t.string "file_content_type"
  74. t.integer "file_file_size"
  75. t.datetime "file_updated_at"
  76. t.string "remote_url", default: "", null: false
  77. t.integer "account_id"
  78. t.datetime "created_at", null: false
  79. t.datetime "updated_at", null: false
  80. t.index ["status_id"], name: "index_media_attachments_on_status_id", using: :btree
  81. end
  82. create_table "mentions", force: :cascade do |t|
  83. t.integer "account_id"
  84. t.integer "status_id"
  85. t.datetime "created_at", null: false
  86. t.datetime "updated_at", null: false
  87. t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree
  88. end
  89. create_table "notifications", force: :cascade do |t|
  90. t.integer "account_id"
  91. t.integer "activity_id"
  92. t.string "activity_type"
  93. t.datetime "created_at", null: false
  94. t.datetime "updated_at", null: false
  95. t.index ["account_id", "activity_id", "activity_type"], name: "account_activity", unique: true, using: :btree
  96. end
  97. create_table "oauth_access_grants", force: :cascade do |t|
  98. t.integer "resource_owner_id", null: false
  99. t.integer "application_id", null: false
  100. t.string "token", null: false
  101. t.integer "expires_in", null: false
  102. t.text "redirect_uri", null: false
  103. t.datetime "created_at", null: false
  104. t.datetime "revoked_at"
  105. t.string "scopes"
  106. t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree
  107. end
  108. create_table "oauth_access_tokens", force: :cascade do |t|
  109. t.integer "resource_owner_id"
  110. t.integer "application_id"
  111. t.string "token", null: false
  112. t.string "refresh_token"
  113. t.integer "expires_in"
  114. t.datetime "revoked_at"
  115. t.datetime "created_at", null: false
  116. t.string "scopes"
  117. t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree
  118. t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree
  119. t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree
  120. end
  121. create_table "oauth_applications", force: :cascade do |t|
  122. t.string "name", null: false
  123. t.string "uid", null: false
  124. t.string "secret", null: false
  125. t.text "redirect_uri", null: false
  126. t.string "scopes", default: "", null: false
  127. t.datetime "created_at"
  128. t.datetime "updated_at"
  129. t.boolean "superapp", default: false, null: false
  130. t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree
  131. end
  132. create_table "settings", force: :cascade do |t|
  133. t.string "var", null: false
  134. t.text "value"
  135. t.string "target_type", null: false
  136. t.integer "target_id", null: false
  137. t.datetime "created_at"
  138. t.datetime "updated_at"
  139. t.index ["target_type", "target_id", "var"], name: "index_settings_on_target_type_and_target_id_and_var", unique: true, using: :btree
  140. end
  141. create_table "statuses", force: :cascade do |t|
  142. t.string "uri"
  143. t.integer "account_id", null: false
  144. t.text "text", default: "", null: false
  145. t.datetime "created_at", null: false
  146. t.datetime "updated_at", null: false
  147. t.integer "in_reply_to_id"
  148. t.integer "reblog_of_id"
  149. t.string "url"
  150. t.index ["account_id"], name: "index_statuses_on_account_id", using: :btree
  151. t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id", using: :btree
  152. t.index ["reblog_of_id"], name: "index_statuses_on_reblog_of_id", using: :btree
  153. t.index ["uri"], name: "index_statuses_on_uri", unique: true, using: :btree
  154. end
  155. create_table "statuses_tags", id: false, force: :cascade do |t|
  156. t.integer "status_id", null: false
  157. t.integer "tag_id", null: false
  158. t.index ["tag_id", "status_id"], name: "index_statuses_tags_on_tag_id_and_status_id", unique: true, using: :btree
  159. end
  160. create_table "stream_entries", force: :cascade do |t|
  161. t.integer "account_id"
  162. t.integer "activity_id"
  163. t.string "activity_type"
  164. t.datetime "created_at", null: false
  165. t.datetime "updated_at", null: false
  166. t.index ["account_id"], name: "index_stream_entries_on_account_id", using: :btree
  167. t.index ["activity_id", "activity_type"], name: "index_stream_entries_on_activity_id_and_activity_type", using: :btree
  168. end
  169. create_table "tags", force: :cascade do |t|
  170. t.string "name", default: "", null: false
  171. t.datetime "created_at", null: false
  172. t.datetime "updated_at", null: false
  173. t.index ["name"], name: "index_tags_on_name", unique: true, using: :btree
  174. end
  175. create_table "users", force: :cascade do |t|
  176. t.string "email", default: "", null: false
  177. t.integer "account_id", null: false
  178. t.datetime "created_at", null: false
  179. t.datetime "updated_at", null: false
  180. t.string "encrypted_password", default: "", null: false
  181. t.string "reset_password_token"
  182. t.datetime "reset_password_sent_at"
  183. t.datetime "remember_created_at"
  184. t.integer "sign_in_count", default: 0, null: false
  185. t.datetime "current_sign_in_at"
  186. t.datetime "last_sign_in_at"
  187. t.inet "current_sign_in_ip"
  188. t.inet "last_sign_in_ip"
  189. t.boolean "admin", default: false
  190. t.string "confirmation_token"
  191. t.datetime "confirmed_at"
  192. t.datetime "confirmation_sent_at"
  193. t.string "unconfirmed_email"
  194. t.string "locale"
  195. t.index ["account_id"], name: "index_users_on_account_id", using: :btree
  196. t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
  197. t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
  198. t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
  199. end
  200. end