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.
 
 
 
 

170 lines
7.7 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: 20160905150353) 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 "verify_token", default: "", null: false
  19. t.string "secret", default: "", null: false
  20. t.text "private_key"
  21. t.text "public_key", default: "", null: false
  22. t.string "remote_url", default: "", null: false
  23. t.string "salmon_url", default: "", null: false
  24. t.string "hub_url", default: "", null: false
  25. t.datetime "created_at", null: false
  26. t.datetime "updated_at", null: false
  27. t.text "note", default: "", null: false
  28. t.string "display_name", default: "", null: false
  29. t.string "uri", default: "", null: false
  30. t.string "url"
  31. t.string "avatar_file_name"
  32. t.string "avatar_content_type"
  33. t.integer "avatar_file_size"
  34. t.datetime "avatar_updated_at"
  35. t.string "header_file_name"
  36. t.string "header_content_type"
  37. t.integer "header_file_size"
  38. t.datetime "header_updated_at"
  39. t.string "avatar_remote_url"
  40. t.index ["username", "domain"], name: "index_accounts_on_username_and_domain", unique: true, using: :btree
  41. end
  42. create_table "favourites", force: :cascade do |t|
  43. t.integer "account_id", null: false
  44. t.integer "status_id", null: false
  45. t.datetime "created_at", null: false
  46. t.datetime "updated_at", null: false
  47. t.index ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true, using: :btree
  48. end
  49. create_table "follows", force: :cascade do |t|
  50. t.integer "account_id", null: false
  51. t.integer "target_account_id", null: false
  52. t.datetime "created_at", null: false
  53. t.datetime "updated_at", null: false
  54. t.index ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true, using: :btree
  55. end
  56. create_table "media_attachments", force: :cascade do |t|
  57. t.integer "status_id"
  58. t.string "file_file_name"
  59. t.string "file_content_type"
  60. t.integer "file_file_size"
  61. t.datetime "file_updated_at"
  62. t.string "remote_url", default: "", null: false
  63. t.integer "account_id"
  64. t.datetime "created_at", null: false
  65. t.datetime "updated_at", null: false
  66. t.index ["status_id"], name: "index_media_attachments_on_status_id", using: :btree
  67. end
  68. create_table "mentions", force: :cascade do |t|
  69. t.integer "account_id"
  70. t.integer "status_id"
  71. t.datetime "created_at", null: false
  72. t.datetime "updated_at", null: false
  73. t.index ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree
  74. end
  75. create_table "oauth_access_grants", force: :cascade do |t|
  76. t.integer "resource_owner_id", null: false
  77. t.integer "application_id", null: false
  78. t.string "token", null: false
  79. t.integer "expires_in", null: false
  80. t.text "redirect_uri", null: false
  81. t.datetime "created_at", null: false
  82. t.datetime "revoked_at"
  83. t.string "scopes"
  84. t.index ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree
  85. end
  86. create_table "oauth_access_tokens", force: :cascade do |t|
  87. t.integer "resource_owner_id"
  88. t.integer "application_id"
  89. t.string "token", null: false
  90. t.string "refresh_token"
  91. t.integer "expires_in"
  92. t.datetime "revoked_at"
  93. t.datetime "created_at", null: false
  94. t.string "scopes"
  95. t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree
  96. t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree
  97. t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree
  98. end
  99. create_table "oauth_applications", force: :cascade do |t|
  100. t.string "name", null: false
  101. t.string "uid", null: false
  102. t.string "secret", null: false
  103. t.text "redirect_uri", null: false
  104. t.string "scopes", default: "", null: false
  105. t.datetime "created_at"
  106. t.datetime "updated_at"
  107. t.integer "owner_id"
  108. t.string "owner_type"
  109. t.boolean "superapp", default: false, null: false
  110. t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
  111. t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree
  112. end
  113. create_table "statuses", force: :cascade do |t|
  114. t.string "uri"
  115. t.integer "account_id", null: false
  116. t.text "text", default: "", null: false
  117. t.datetime "created_at", null: false
  118. t.datetime "updated_at", null: false
  119. t.integer "in_reply_to_id"
  120. t.integer "reblog_of_id"
  121. t.string "url"
  122. t.index ["account_id"], name: "index_statuses_on_account_id", using: :btree
  123. t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id", using: :btree
  124. t.index ["reblog_of_id"], name: "index_statuses_on_reblog_of_id", using: :btree
  125. t.index ["uri"], name: "index_statuses_on_uri", unique: true, using: :btree
  126. end
  127. create_table "stream_entries", force: :cascade do |t|
  128. t.integer "account_id"
  129. t.integer "activity_id"
  130. t.string "activity_type"
  131. t.datetime "created_at", null: false
  132. t.datetime "updated_at", null: false
  133. t.index ["account_id"], name: "index_stream_entries_on_account_id", using: :btree
  134. t.index ["activity_id", "activity_type"], name: "index_stream_entries_on_activity_id_and_activity_type", using: :btree
  135. end
  136. create_table "users", force: :cascade do |t|
  137. t.string "email", default: "", null: false
  138. t.integer "account_id", null: false
  139. t.datetime "created_at", null: false
  140. t.datetime "updated_at", null: false
  141. t.string "encrypted_password", default: "", null: false
  142. t.string "reset_password_token"
  143. t.datetime "reset_password_sent_at"
  144. t.datetime "remember_created_at"
  145. t.integer "sign_in_count", default: 0, null: false
  146. t.datetime "current_sign_in_at"
  147. t.datetime "last_sign_in_at"
  148. t.inet "current_sign_in_ip"
  149. t.inet "last_sign_in_ip"
  150. t.boolean "admin", default: false
  151. t.index ["account_id"], name: "index_users_on_account_id", using: :btree
  152. t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
  153. t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
  154. end
  155. end