Merge branch 'master' into feature/1929#add_shift_task_usage

This commit is contained in:
Bertocq
2017-10-03 12:01:21 +02:00
92 changed files with 1683 additions and 317 deletions

View File

@@ -36,6 +36,7 @@ Setting.create(key: 'feature.facebook_login', value: "true")
Setting.create(key: 'feature.google_login', value: "true")
Setting.create(key: 'feature.signature_sheets', value: "true")
Setting.create(key: 'feature.legislation', value: "true")
Setting.create(key: 'feature.user.recommendations', value: "true")
Setting.create(key: 'feature.community', value: "true")
Setting.create(key: 'feature.map', value: "true")
Setting.create(key: 'per_page_code_head', value: "")

View File

@@ -0,0 +1,5 @@
class AddOriginToPollVoters < ActiveRecord::Migration
def change
add_column :poll_voters, :origin, :string
end
end

View File

@@ -0,0 +1,24 @@
class CreatePollRecount < ActiveRecord::Migration
def change
create_table :poll_recounts do |t|
t.integer :author_id
t.string :origin
t.date :date
t.integer :booth_assignment_id
t.integer :officer_assignment_id
t.text :officer_assignment_id_log, default: ""
t.text :author_id_log, default: ""
t.integer :white_amount
t.text :white_amount_log, default: ""
t.integer :null_amount
t.text :null_amount_log, default: ""
t.integer :total_amount
t.text :total_amount_log, default: ""
end
add_index :poll_recounts, :booth_assignment_id
add_index :poll_recounts, :officer_assignment_id
add_foreign_key :poll_recounts, :poll_booth_assignments, column: :booth_assignment_id
add_foreign_key :poll_recounts, :poll_officer_assignments, column: :officer_assignment_id
end
end

View File

@@ -0,0 +1,7 @@
class AddDefaultToRecountAmounts < ActiveRecord::Migration
def change
change_column_default :poll_recounts, :white_amount, 0
change_column_default :poll_recounts, :null_amount, 0
change_column_default :poll_recounts, :total_amount, 0
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20171002103314) do
ActiveRecord::Schema.define(version: 20171002191347) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -690,6 +690,25 @@ ActiveRecord::Schema.define(version: 20171002103314) do
add_index "poll_questions", ["proposal_id"], name: "index_poll_questions_on_proposal_id", using: :btree
add_index "poll_questions", ["tsv"], name: "index_poll_questions_on_tsv", using: :gin
create_table "poll_recounts", force: :cascade do |t|
t.integer "author_id"
t.string "origin"
t.date "date"
t.integer "booth_assignment_id"
t.integer "officer_assignment_id"
t.text "officer_assignment_id_log", default: ""
t.text "author_id_log", default: ""
t.integer "white_amount", default: 0
t.text "white_amount_log", default: ""
t.integer "null_amount", default: 0
t.text "null_amount_log", default: ""
t.integer "total_amount", default: 0
t.text "total_amount_log", default: ""
end
add_index "poll_recounts", ["booth_assignment_id"], name: "index_poll_recounts_on_booth_assignment_id", using: :btree
add_index "poll_recounts", ["officer_assignment_id"], name: "index_poll_recounts_on_officer_assignment_id", using: :btree
create_table "poll_shifts", force: :cascade do |t|
t.integer "booth_id"
t.integer "officer_id"
@@ -734,6 +753,7 @@ ActiveRecord::Schema.define(version: 20171002103314) do
t.integer "answer_id"
t.integer "officer_assignment_id"
t.integer "user_id"
t.string "origin"
end
add_index "poll_voters", ["booth_assignment_id"], name: "index_poll_voters_on_booth_assignment_id", using: :btree
@@ -1127,6 +1147,8 @@ ActiveRecord::Schema.define(version: 20171002103314) do
add_foreign_key "poll_questions", "polls"
add_foreign_key "poll_questions", "proposals"
add_foreign_key "poll_questions", "users", column: "author_id"
add_foreign_key "poll_recounts", "poll_booth_assignments", column: "booth_assignment_id"
add_foreign_key "poll_recounts", "poll_officer_assignments", column: "officer_assignment_id"
add_foreign_key "poll_voters", "polls"
add_foreign_key "poll_white_results", "poll_booth_assignments", column: "booth_assignment_id"
add_foreign_key "poll_white_results", "poll_officer_assignments", column: "officer_assignment_id"

View File

@@ -79,6 +79,7 @@ Setting['feature.public_stats'] = true
Setting['feature.budgets'] = true
Setting['feature.signature_sheets'] = true
Setting['feature.legislation'] = true
Setting['feature.user.recommendations'] = true
Setting['feature.community'] = true
Setting['feature.map'] = nil