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.

166 lines
7.4 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. # encoding: UTF-8
  2. # This file is auto-generated from the current state of the database. Instead
  3. # of editing this file, please use the migrations feature of Active Record to
  4. # incrementally modify your database, and then regenerate this schema definition.
  5. #
  6. # Note that this schema.rb definition is the authoritative source for your
  7. # database schema. If you need to create the application database on another
  8. # system, you should be using db:schema:load, not running all the migrations
  9. # from scratch. The latter is a flawed and unsustainable approach (the more migrations
  10. # you'll amass, the slower it'll run and the greater likelihood for issues).
  11. #
  12. # It's strongly recommended that you check this file into your version control system.
  13. ActiveRecord::Schema.define(version: 20160325130944) do
  14. # These are extensions that must be enabled in order to support this database
  15. enable_extension "plpgsql"
  16. create_table "accounts", force: :cascade do |t|
  17. t.string "username", default: "", null: false
  18. t.string "domain"
  19. t.string "verify_token", default: "", null: false
  20. t.string "secret", default: "", null: false
  21. t.text "private_key"
  22. t.text "public_key", default: "", null: false
  23. t.string "remote_url", default: "", null: false
  24. t.string "salmon_url", default: "", null: false
  25. t.string "hub_url", default: "", null: false
  26. t.datetime "created_at", null: false
  27. t.datetime "updated_at", null: false
  28. t.text "note", default: "", null: false
  29. t.string "display_name", default: "", null: false
  30. t.string "uri", default: "", null: false
  31. t.string "url"
  32. t.string "avatar_file_name"
  33. t.string "avatar_content_type"
  34. t.integer "avatar_file_size"
  35. t.datetime "avatar_updated_at"
  36. t.string "header_file_name"
  37. t.string "header_content_type"
  38. t.integer "header_file_size"
  39. t.datetime "header_updated_at"
  40. t.string "avatar_remote_url"
  41. end
  42. add_index "accounts", ["username", "domain"], name: "index_accounts_on_username_and_domain", unique: true, using: :btree
  43. create_table "favourites", force: :cascade do |t|
  44. t.integer "account_id", null: false
  45. t.integer "status_id", null: false
  46. t.datetime "created_at", null: false
  47. t.datetime "updated_at", null: false
  48. end
  49. add_index "favourites", ["account_id", "status_id"], name: "index_favourites_on_account_id_and_status_id", unique: true, using: :btree
  50. create_table "follows", force: :cascade do |t|
  51. t.integer "account_id", null: false
  52. t.integer "target_account_id", null: false
  53. t.datetime "created_at", null: false
  54. t.datetime "updated_at", null: false
  55. end
  56. add_index "follows", ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true, using: :btree
  57. create_table "mentions", force: :cascade do |t|
  58. t.integer "account_id"
  59. t.integer "status_id"
  60. t.datetime "created_at", null: false
  61. t.datetime "updated_at", null: false
  62. end
  63. add_index "mentions", ["account_id", "status_id"], name: "index_mentions_on_account_id_and_status_id", unique: true, using: :btree
  64. create_table "oauth_access_grants", force: :cascade do |t|
  65. t.integer "resource_owner_id", null: false
  66. t.integer "application_id", null: false
  67. t.string "token", null: false
  68. t.integer "expires_in", null: false
  69. t.text "redirect_uri", null: false
  70. t.datetime "created_at", null: false
  71. t.datetime "revoked_at"
  72. t.string "scopes"
  73. end
  74. add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree
  75. create_table "oauth_access_tokens", force: :cascade do |t|
  76. t.integer "resource_owner_id"
  77. t.integer "application_id"
  78. t.string "token", null: false
  79. t.string "refresh_token"
  80. t.integer "expires_in"
  81. t.datetime "revoked_at"
  82. t.datetime "created_at", null: false
  83. t.string "scopes"
  84. end
  85. add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree
  86. add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree
  87. add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree
  88. create_table "oauth_applications", force: :cascade do |t|
  89. t.string "name", null: false
  90. t.string "uid", null: false
  91. t.string "secret", null: false
  92. t.text "redirect_uri", null: false
  93. t.string "scopes", default: "", null: false
  94. t.datetime "created_at"
  95. t.datetime "updated_at"
  96. t.integer "owner_id"
  97. t.string "owner_type"
  98. end
  99. add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
  100. add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree
  101. create_table "statuses", force: :cascade do |t|
  102. t.string "uri"
  103. t.integer "account_id", null: false
  104. t.text "text", default: "", null: false
  105. t.datetime "created_at", null: false
  106. t.datetime "updated_at", null: false
  107. t.integer "in_reply_to_id"
  108. t.integer "reblog_of_id"
  109. t.string "url"
  110. end
  111. add_index "statuses", ["account_id"], name: "index_statuses_on_account_id", using: :btree
  112. add_index "statuses", ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id", using: :btree
  113. add_index "statuses", ["reblog_of_id"], name: "index_statuses_on_reblog_of_id", using: :btree
  114. add_index "statuses", ["uri"], name: "index_statuses_on_uri", unique: true, using: :btree
  115. create_table "stream_entries", force: :cascade do |t|
  116. t.integer "account_id"
  117. t.integer "activity_id"
  118. t.string "activity_type"
  119. t.datetime "created_at", null: false
  120. t.datetime "updated_at", null: false
  121. end
  122. add_index "stream_entries", ["account_id"], name: "index_stream_entries_on_account_id", using: :btree
  123. add_index "stream_entries", ["activity_id", "activity_type"], name: "index_stream_entries_on_activity_id_and_activity_type", using: :btree
  124. create_table "users", force: :cascade do |t|
  125. t.string "email", default: "", null: false
  126. t.integer "account_id", null: false
  127. t.datetime "created_at", null: false
  128. t.datetime "updated_at", null: false
  129. t.string "encrypted_password", default: "", null: false
  130. t.string "reset_password_token"
  131. t.datetime "reset_password_sent_at"
  132. t.datetime "remember_created_at"
  133. t.integer "sign_in_count", default: 0, null: false
  134. t.datetime "current_sign_in_at"
  135. t.datetime "last_sign_in_at"
  136. t.inet "current_sign_in_ip"
  137. t.inet "last_sign_in_ip"
  138. t.boolean "admin", default: false
  139. end
  140. add_index "users", ["account_id"], name: "index_users_on_account_id", using: :btree
  141. add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
  142. add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
  143. end