0
0
Fork 0

Add voters count support (#11917)

* Add voters count to polls

* Add ActivityPub serialization and parsing of voters count

* Add support for voters count in WebUI

* Move incrementation of voters count out of redis lock

* Reword “voters” to “people”
This commit is contained in:
ThibG 2019-09-29 22:58:01 +02:00 committed by Eugen Rochko
parent cfe2d1cc4a
commit 3babf8464b
13 changed files with 113 additions and 20 deletions

View file

@ -0,0 +1,5 @@
class AddVotersCountToPolls < ActiveRecord::Migration[5.2]
def change
add_column :polls, :voters_count, :bigint
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_09_27_124642) do
ActiveRecord::Schema.define(version: 2019_09_27_232842) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -529,6 +529,7 @@ ActiveRecord::Schema.define(version: 2019_09_27_124642) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "lock_version", default: 0, null: false
t.bigint "voters_count"
t.index ["account_id"], name: "index_polls_on_account_id"
t.index ["status_id"], name: "index_polls_on_status_id"
end