Store URIs of follows, follow requests and blocks for ActivityPub (#7160)
Same URI passed between follow request and follow, since they are the same thing in ActivityPub. Local URIs are generated during creation using UUIDs and are passed to serializers.
This commit is contained in:
parent
d1aef17f9a
commit
6793bec4c6
11 changed files with 64 additions and 13 deletions
7
db/migrate/20180416210259_add_uri_to_relationships.rb
Normal file
7
db/migrate/20180416210259_add_uri_to_relationships.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class AddUriToRelationships < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :follows, :uri, :string
|
||||
add_column :follow_requests, :uri, :string
|
||||
add_column :blocks, :uri, :string
|
||||
end
|
||||
end
|
|
@ -10,10 +10,9 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2018_04_10_204633) do
|
||||
ActiveRecord::Schema.define(version: 2018_04_16_210259) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "plpgsql"
|
||||
|
||||
create_table "account_domain_blocks", force: :cascade do |t|
|
||||
|
@ -112,6 +111,7 @@ ActiveRecord::Schema.define(version: 2018_04_10_204633) do
|
|||
t.datetime "updated_at", null: false
|
||||
t.bigint "account_id", null: false
|
||||
t.bigint "target_account_id", null: false
|
||||
t.string "uri"
|
||||
t.index ["account_id", "target_account_id"], name: "index_blocks_on_account_id_and_target_account_id", unique: true
|
||||
end
|
||||
|
||||
|
@ -176,6 +176,7 @@ ActiveRecord::Schema.define(version: 2018_04_10_204633) do
|
|||
t.bigint "account_id", null: false
|
||||
t.bigint "target_account_id", null: false
|
||||
t.boolean "show_reblogs", default: true, null: false
|
||||
t.string "uri"
|
||||
t.index ["account_id", "target_account_id"], name: "index_follow_requests_on_account_id_and_target_account_id", unique: true
|
||||
end
|
||||
|
||||
|
@ -185,6 +186,7 @@ ActiveRecord::Schema.define(version: 2018_04_10_204633) do
|
|||
t.bigint "account_id", null: false
|
||||
t.bigint "target_account_id", null: false
|
||||
t.boolean "show_reblogs", default: true, null: false
|
||||
t.string "uri"
|
||||
t.index ["account_id", "target_account_id"], name: "index_follows_on_account_id_and_target_account_id", unique: true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue