Implement a click-to-view spoiler system
This commit is contained in:
parent
1761d3f9c3
commit
bf0f6eb62d
18 changed files with 192 additions and 77 deletions
5
db/migrate/20170112041538_add_spoiler_to_statuses.rb
Normal file
5
db/migrate/20170112041538_add_spoiler_to_statuses.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddSpoilerToStatuses < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :statuses, :spoiler, :boolean, default: false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddSpoilerTextToStatuses < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :statuses, :spoiler_text, :text, default: ""
|
||||
end
|
||||
end
|
71
db/schema.rb
71
db/schema.rb
|
@ -186,74 +186,6 @@ ActiveRecord::Schema.define(version: 20170123203248) do
|
|||
t.index ["topic", "callback"], name: "index_pubsubhubbub_subscriptions_on_topic_and_callback", unique: true, using: :btree
|
||||
end
|
||||
|
||||
create_table "push_devices", force: :cascade do |t|
|
||||
t.string "service", default: "", null: false
|
||||
t.string "token", default: "", null: false
|
||||
t.integer "account", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["service", "token"], name: "index_push_devices_on_service_and_token", unique: true, using: :btree
|
||||
end
|
||||
|
||||
create_table "rpush_apps", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "environment"
|
||||
t.text "certificate"
|
||||
t.string "password"
|
||||
t.integer "connections", default: 1, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "type", null: false
|
||||
t.string "auth_key"
|
||||
t.string "client_id"
|
||||
t.string "client_secret"
|
||||
t.string "access_token"
|
||||
t.datetime "access_token_expiration"
|
||||
end
|
||||
|
||||
create_table "rpush_feedback", force: :cascade do |t|
|
||||
t.string "device_token", limit: 64, null: false
|
||||
t.datetime "failed_at", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "app_id"
|
||||
t.index ["device_token"], name: "index_rpush_feedback_on_device_token", using: :btree
|
||||
end
|
||||
|
||||
create_table "rpush_notifications", force: :cascade do |t|
|
||||
t.integer "badge"
|
||||
t.string "device_token", limit: 64
|
||||
t.string "sound", default: "default"
|
||||
t.text "alert"
|
||||
t.text "data"
|
||||
t.integer "expiry", default: 86400
|
||||
t.boolean "delivered", default: false, null: false
|
||||
t.datetime "delivered_at"
|
||||
t.boolean "failed", default: false, null: false
|
||||
t.datetime "failed_at"
|
||||
t.integer "error_code"
|
||||
t.text "error_description"
|
||||
t.datetime "deliver_after"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.boolean "alert_is_json", default: false
|
||||
t.string "type", null: false
|
||||
t.string "collapse_key"
|
||||
t.boolean "delay_while_idle", default: false, null: false
|
||||
t.text "registration_ids"
|
||||
t.integer "app_id", null: false
|
||||
t.integer "retries", default: 0
|
||||
t.string "uri"
|
||||
t.datetime "fail_after"
|
||||
t.boolean "processing", default: false, null: false
|
||||
t.integer "priority"
|
||||
t.text "url_args"
|
||||
t.string "category"
|
||||
t.boolean "content_available", default: false
|
||||
t.text "notification"
|
||||
t.index ["delivered", "failed"], name: "index_rpush_notifications_multi", where: "((NOT delivered) AND (NOT failed))", using: :btree
|
||||
end
|
||||
|
||||
create_table "settings", force: :cascade do |t|
|
||||
t.string "var", null: false
|
||||
t.text "value"
|
||||
|
@ -276,6 +208,9 @@ ActiveRecord::Schema.define(version: 20170123203248) do
|
|||
t.boolean "sensitive", default: false
|
||||
t.integer "visibility", default: 0, null: false
|
||||
t.integer "in_reply_to_account_id"
|
||||
t.string "conversation_uri"
|
||||
t.boolean "spoiler", default: false
|
||||
t.text "spoiler_text", default: ""
|
||||
t.integer "application_id"
|
||||
t.index ["account_id"], name: "index_statuses_on_account_id", using: :btree
|
||||
t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id", using: :btree
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue