Merge branch 'master' into iss-1192-test

This commit is contained in:
Raimond Garcia
2017-04-12 11:51:48 +02:00
committed by GitHub
406 changed files with 11980 additions and 1214 deletions

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170114154421) do
ActiveRecord::Schema.define(version: 20170324101716) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -283,6 +283,8 @@ ActiveRecord::Schema.define(version: 20170114154421) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "district_code"
t.integer "poll_officer_id"
t.integer "year_of_birth"
end
add_index "failed_census_calls", ["user_id"], name: "index_failed_census_calls_on_user_id", using: :btree
@@ -308,6 +310,14 @@ ActiveRecord::Schema.define(version: 20170114154421) do
t.string "census_code"
end
create_table "geozones_polls", force: :cascade do |t|
t.integer "geozone_id"
t.integer "poll_id"
end
add_index "geozones_polls", ["geozone_id"], name: "index_geozones_polls_on_geozone_id", using: :btree
add_index "geozones_polls", ["poll_id"], name: "index_geozones_polls_on_poll_id", using: :btree
create_table "identities", force: :cascade do |t|
t.integer "user_id"
t.string "provider"
@@ -367,6 +377,184 @@ ActiveRecord::Schema.define(version: 20170114154421) do
add_index "organizations", ["user_id"], name: "index_organizations_on_user_id", using: :btree
create_table "poll_answers", force: :cascade do |t|
t.integer "question_id"
t.integer "author_id"
t.string "answer"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "poll_answers", ["author_id"], name: "index_poll_answers_on_author_id", using: :btree
add_index "poll_answers", ["question_id", "answer"], name: "index_poll_answers_on_question_id_and_answer", using: :btree
add_index "poll_answers", ["question_id"], name: "index_poll_answers_on_question_id", using: :btree
create_table "poll_booth_assignments", force: :cascade do |t|
t.integer "booth_id"
t.integer "poll_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "poll_booth_assignments", ["booth_id"], name: "index_poll_booth_assignments_on_booth_id", using: :btree
add_index "poll_booth_assignments", ["poll_id"], name: "index_poll_booth_assignments_on_poll_id", using: :btree
create_table "poll_booths", force: :cascade do |t|
t.string "name"
t.string "location"
end
create_table "poll_final_recounts", force: :cascade do |t|
t.integer "booth_assignment_id"
t.integer "officer_assignment_id"
t.integer "count"
t.text "count_log", default: ""
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "officer_assignment_id_log", default: ""
t.date "date", null: false
end
add_index "poll_final_recounts", ["booth_assignment_id"], name: "index_poll_final_recounts_on_booth_assignment_id", using: :btree
add_index "poll_final_recounts", ["officer_assignment_id"], name: "index_poll_final_recounts_on_officer_assignment_id", using: :btree
create_table "poll_null_results", force: :cascade do |t|
t.integer "author_id"
t.integer "amount"
t.string "origin"
t.date "date"
t.integer "booth_assignment_id"
t.integer "officer_assignment_id"
t.text "amount_log", default: ""
t.text "officer_assignment_id_log", default: ""
t.text "author_id_log", default: ""
end
add_index "poll_null_results", ["booth_assignment_id"], name: "index_poll_null_results_on_booth_assignment_id", using: :btree
add_index "poll_null_results", ["officer_assignment_id"], name: "index_poll_null_results_on_officer_assignment_id", using: :btree
create_table "poll_officer_assignments", force: :cascade do |t|
t.integer "booth_assignment_id"
t.integer "officer_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.date "date", null: false
t.boolean "final", default: false
t.string "user_data_log", default: ""
end
add_index "poll_officer_assignments", ["booth_assignment_id"], name: "index_poll_officer_assignments_on_booth_assignment_id", using: :btree
add_index "poll_officer_assignments", ["officer_id", "date"], name: "index_poll_officer_assignments_on_officer_id_and_date", using: :btree
add_index "poll_officer_assignments", ["officer_id"], name: "index_poll_officer_assignments_on_officer_id", using: :btree
create_table "poll_officers", force: :cascade do |t|
t.integer "user_id"
t.integer "failed_census_calls_count", default: 0
end
add_index "poll_officers", ["user_id"], name: "index_poll_officers_on_user_id", using: :btree
create_table "poll_partial_results", force: :cascade do |t|
t.integer "question_id"
t.integer "author_id"
t.string "answer"
t.integer "amount"
t.string "origin"
t.date "date"
t.integer "booth_assignment_id"
t.integer "officer_assignment_id"
t.text "amount_log", default: ""
t.text "officer_assignment_id_log", default: ""
t.text "author_id_log", default: ""
end
add_index "poll_partial_results", ["answer"], name: "index_poll_partial_results_on_answer", using: :btree
add_index "poll_partial_results", ["author_id"], name: "index_poll_partial_results_on_author_id", using: :btree
add_index "poll_partial_results", ["booth_assignment_id", "date"], name: "index_poll_partial_results_on_booth_assignment_id_and_date", using: :btree
add_index "poll_partial_results", ["origin"], name: "index_poll_partial_results_on_origin", using: :btree
add_index "poll_partial_results", ["question_id"], name: "index_poll_partial_results_on_question_id", using: :btree
create_table "poll_questions", force: :cascade do |t|
t.integer "proposal_id"
t.integer "poll_id"
t.integer "author_id"
t.string "author_visible_name"
t.string "title"
t.string "valid_answers"
t.text "description"
t.integer "comments_count"
t.datetime "hidden_at"
t.datetime "created_at"
t.datetime "updated_at"
t.tsvector "tsv"
end
add_index "poll_questions", ["author_id"], name: "index_poll_questions_on_author_id", using: :btree
add_index "poll_questions", ["poll_id"], name: "index_poll_questions_on_poll_id", using: :btree
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 "booth_assignment_id"
t.integer "officer_assignment_id"
t.integer "count"
t.text "count_log", default: ""
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.date "date", null: false
t.text "officer_assignment_id_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_voters", force: :cascade do |t|
t.string "document_number"
t.string "document_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "poll_id", null: false
t.integer "booth_assignment_id"
t.integer "age"
t.string "gender"
t.integer "geozone_id"
t.integer "answer_id"
t.integer "officer_assignment_id"
t.integer "user_id"
end
add_index "poll_voters", ["booth_assignment_id"], name: "index_poll_voters_on_booth_assignment_id", using: :btree
add_index "poll_voters", ["document_number"], name: "index_poll_voters_on_document_number", using: :btree
add_index "poll_voters", ["officer_assignment_id"], name: "index_poll_voters_on_officer_assignment_id", using: :btree
add_index "poll_voters", ["poll_id", "document_number", "document_type"], name: "doc_by_poll", using: :btree
add_index "poll_voters", ["poll_id"], name: "index_poll_voters_on_poll_id", using: :btree
add_index "poll_voters", ["user_id"], name: "index_poll_voters_on_user_id", using: :btree
create_table "poll_white_results", force: :cascade do |t|
t.integer "author_id"
t.integer "amount"
t.string "origin"
t.date "date"
t.integer "booth_assignment_id"
t.integer "officer_assignment_id"
t.text "amount_log", default: ""
t.text "officer_assignment_id_log", default: ""
t.text "author_id_log", default: ""
end
add_index "poll_white_results", ["booth_assignment_id"], name: "index_poll_white_results_on_booth_assignment_id", using: :btree
add_index "poll_white_results", ["officer_assignment_id"], name: "index_poll_white_results_on_officer_assignment_id", using: :btree
create_table "polls", force: :cascade do |t|
t.string "name"
t.datetime "starts_at"
t.datetime "ends_at"
t.boolean "published", default: false
t.boolean "geozone_restricted", default: false
end
add_index "polls", ["starts_at", "ends_at"], name: "index_polls_on_starts_at_and_ends_at", using: :btree
create_table "proposal_notifications", force: :cascade do |t|
t.string "title"
t.text "body"
@@ -441,6 +629,40 @@ ActiveRecord::Schema.define(version: 20170114154421) do
t.datetime "updated_at"
end
create_table "site_customization_content_blocks", force: :cascade do |t|
t.string "name"
t.string "locale"
t.text "body"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "site_customization_content_blocks", ["name", "locale"], name: "index_site_customization_content_blocks_on_name_and_locale", unique: true, using: :btree
create_table "site_customization_images", force: :cascade do |t|
t.string "name", null: false
t.string "image_file_name"
t.string "image_content_type"
t.integer "image_file_size"
t.datetime "image_updated_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "site_customization_images", ["name"], name: "index_site_customization_images_on_name", unique: true, using: :btree
create_table "site_customization_pages", force: :cascade do |t|
t.string "slug", null: false
t.string "title", null: false
t.string "subtitle"
t.text "content"
t.boolean "more_info_flag"
t.boolean "print_content_flag"
t.string "status", default: "draft"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "spending_proposals", force: :cascade do |t|
t.string "title"
t.text "description"
@@ -580,9 +802,10 @@ ActiveRecord::Schema.define(version: 20170114154421) do
t.boolean "email_digest", default: true
t.boolean "email_on_direct_message", default: true
t.boolean "official_position_badge", default: false
t.datetime "password_changed_at", default: '2016-11-02 13:51:14', null: false
t.datetime "password_changed_at", default: '2016-11-23 10:59:20', null: false
t.boolean "created_from_signature", default: false
t.integer "failed_email_digests_count", default: 0
t.text "former_users_data_log", default: ""
end
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
@@ -673,14 +896,36 @@ ActiveRecord::Schema.define(version: 20170114154421) do
add_foreign_key "administrators", "users"
add_foreign_key "annotations", "legislations"
add_foreign_key "annotations", "users"
add_foreign_key "failed_census_calls", "poll_officers"
add_foreign_key "failed_census_calls", "users"
add_foreign_key "flags", "users"
add_foreign_key "geozones_polls", "geozones"
add_foreign_key "geozones_polls", "polls"
add_foreign_key "identities", "users"
add_foreign_key "locks", "users"
add_foreign_key "managers", "users"
add_foreign_key "moderators", "users"
add_foreign_key "notifications", "users"
add_foreign_key "organizations", "users"
add_foreign_key "poll_answers", "poll_questions", column: "question_id"
add_foreign_key "poll_booth_assignments", "polls"
add_foreign_key "poll_final_recounts", "poll_booth_assignments", column: "booth_assignment_id"
add_foreign_key "poll_final_recounts", "poll_officer_assignments", column: "officer_assignment_id"
add_foreign_key "poll_null_results", "poll_booth_assignments", column: "booth_assignment_id"
add_foreign_key "poll_null_results", "poll_officer_assignments", column: "officer_assignment_id"
add_foreign_key "poll_officer_assignments", "poll_booth_assignments", column: "booth_assignment_id"
add_foreign_key "poll_partial_results", "poll_booth_assignments", column: "booth_assignment_id"
add_foreign_key "poll_partial_results", "poll_officer_assignments", column: "officer_assignment_id"
add_foreign_key "poll_partial_results", "poll_questions", column: "question_id"
add_foreign_key "poll_partial_results", "users", column: "author_id"
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"
add_foreign_key "users", "geozones"
add_foreign_key "valuators", "users"
end