Merge branch 'master' into dashboard

This commit is contained in:
decabeza
2019-03-26 16:45:48 +01:00
2476 changed files with 62613 additions and 84405 deletions

View File

@@ -11,13 +11,29 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20190108133246) do
ActiveRecord::Schema.define(version: 20190205131722) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
enable_extension "unaccent"
enable_extension "pg_trgm"
create_table "active_poll_translations", force: :cascade do |t|
t.integer "active_poll_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "description"
end
add_index "active_poll_translations", ["active_poll_id"], name: "index_active_poll_translations_on_active_poll_id", using: :btree
add_index "active_poll_translations", ["locale"], name: "index_active_poll_translations_on_locale", using: :btree
create_table "active_polls", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "activities", force: :cascade do |t|
t.integer "user_id"
t.string "action"
@@ -73,19 +89,6 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "ahoy_events", ["user_id"], name: "index_ahoy_events_on_user_id", using: :btree
add_index "ahoy_events", ["visit_id"], name: "index_ahoy_events_on_visit_id", using: :btree
create_table "annotations", force: :cascade do |t|
t.string "quote"
t.text "ranges"
t.text "text"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "user_id"
t.integer "legacy_legislation_id"
end
add_index "annotations", ["legacy_legislation_id"], name: "index_annotations_on_legacy_legislation_id", using: :btree
add_index "annotations", ["user_id"], name: "index_annotations_on_user_id", using: :btree
create_table "banner_sections", force: :cascade do |t|
t.integer "banner_id"
t.integer "web_section_id"
@@ -141,6 +144,27 @@ ActiveRecord::Schema.define(version: 20190108133246) do
t.datetime "updated_at", null: false
end
create_table "budget_content_blocks", force: :cascade do |t|
t.integer "heading_id"
t.text "body"
t.string "locale"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "budget_content_blocks", ["heading_id"], name: "index_budget_content_blocks_on_heading_id", using: :btree
create_table "budget_group_translations", force: :cascade do |t|
t.integer "budget_group_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
end
add_index "budget_group_translations", ["budget_group_id"], name: "index_budget_group_translations_on_budget_group_id", using: :btree
add_index "budget_group_translations", ["locale"], name: "index_budget_group_translations_on_locale", using: :btree
create_table "budget_groups", force: :cascade do |t|
t.integer "budget_id"
t.string "name", limit: 50
@@ -150,12 +174,26 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "budget_groups", ["budget_id"], name: "index_budget_groups_on_budget_id", using: :btree
create_table "budget_heading_translations", force: :cascade do |t|
t.integer "budget_heading_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
end
add_index "budget_heading_translations", ["budget_heading_id"], name: "index_budget_heading_translations_on_budget_heading_id", using: :btree
add_index "budget_heading_translations", ["locale"], name: "index_budget_heading_translations_on_locale", using: :btree
create_table "budget_headings", force: :cascade do |t|
t.integer "group_id"
t.string "name", limit: 50
t.integer "price", limit: 8
t.string "name", limit: 50
t.integer "price", limit: 8
t.integer "population"
t.string "slug"
t.boolean "allow_custom_content", default: false
t.text "latitude"
t.text "longitude"
end
add_index "budget_headings", ["group_id"], name: "index_budget_headings_on_group_id", using: :btree
@@ -242,6 +280,18 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "budget_investments", ["heading_id"], name: "index_budget_investments_on_heading_id", using: :btree
add_index "budget_investments", ["tsv"], name: "index_budget_investments_on_tsv", using: :gin
create_table "budget_phase_translations", force: :cascade do |t|
t.integer "budget_phase_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "description"
t.text "summary"
end
add_index "budget_phase_translations", ["budget_phase_id"], name: "index_budget_phase_translations_on_budget_phase_id", using: :btree
add_index "budget_phase_translations", ["locale"], name: "index_budget_phase_translations_on_locale", using: :btree
create_table "budget_phases", force: :cascade do |t|
t.integer "budget_id"
t.integer "next_phase_id"
@@ -266,6 +316,17 @@ ActiveRecord::Schema.define(version: 20190108133246) do
t.datetime "updated_at", null: false
end
create_table "budget_translations", force: :cascade do |t|
t.integer "budget_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
end
add_index "budget_translations", ["budget_id"], name: "index_budget_translations_on_budget_id", using: :btree
add_index "budget_translations", ["locale"], name: "index_budget_translations_on_locale", using: :btree
create_table "budget_valuator_assignments", force: :cascade do |t|
t.integer "valuator_id"
t.integer "investment_id"
@@ -572,13 +633,6 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "images", ["imageable_type", "imageable_id"], name: "index_images_on_imageable_type_and_imageable_id", using: :btree
add_index "images", ["user_id"], name: "index_images_on_user_id", using: :btree
create_table "legacy_legislations", force: :cascade do |t|
t.string "title"
t.text "body"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "legislation_annotations", force: :cascade do |t|
t.string "quote"
t.text "ranges"
@@ -657,6 +711,8 @@ ActiveRecord::Schema.define(version: 20190108133246) do
t.text "summary"
t.text "description"
t.text "additional_info"
t.text "milestones_summary"
t.text "homepage"
end
add_index "legislation_process_translations", ["legislation_process_id"], name: "index_199e5fed0aca73302243f6a1fca885ce10cdbb55", using: :btree
@@ -687,13 +743,21 @@ ActiveRecord::Schema.define(version: 20190108133246) do
t.date "proposals_phase_end_date"
t.boolean "proposals_phase_enabled"
t.text "proposals_description"
t.date "draft_start_date"
t.date "draft_end_date"
t.boolean "draft_phase_enabled", default: false
t.boolean "homepage_enabled", default: false
t.text "background_color"
t.text "font_color"
end
add_index "legislation_processes", ["allegations_end_date"], name: "index_legislation_processes_on_allegations_end_date", using: :btree
add_index "legislation_processes", ["allegations_start_date"], name: "index_legislation_processes_on_allegations_start_date", using: :btree
add_index "legislation_processes", ["debate_end_date"], name: "index_legislation_processes_on_debate_end_date", using: :btree
add_index "legislation_processes", ["debate_start_date"], name: "index_legislation_processes_on_debate_start_date", using: :btree
add_index "legislation_processes", ["draft_end_date"], name: "index_legislation_processes_on_draft_end_date", using: :btree
add_index "legislation_processes", ["draft_publication_date"], name: "index_legislation_processes_on_draft_publication_date", using: :btree
add_index "legislation_processes", ["draft_start_date"], name: "index_legislation_processes_on_draft_start_date", using: :btree
add_index "legislation_processes", ["end_date"], name: "index_legislation_processes_on_end_date", using: :btree
add_index "legislation_processes", ["hidden_at"], name: "index_legislation_processes_on_hidden_at", using: :btree
add_index "legislation_processes", ["result_publication_date"], name: "index_legislation_processes_on_result_publication_date", using: :btree
@@ -728,8 +792,10 @@ ActiveRecord::Schema.define(version: 20190108133246) do
t.integer "cached_votes_total", default: 0
t.integer "cached_votes_down", default: 0
t.boolean "selected"
t.integer "cached_votes_score", default: 0
end
add_index "legislation_proposals", ["cached_votes_score"], name: "index_legislation_proposals_on_cached_votes_score", using: :btree
add_index "legislation_proposals", ["legislation_process_id"], name: "index_legislation_proposals_on_legislation_process_id", using: :btree
create_table "legislation_question_option_translations", force: :cascade do |t|
@@ -828,6 +894,41 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "map_locations", ["investment_id"], name: "index_map_locations_on_investment_id", using: :btree
add_index "map_locations", ["proposal_id"], name: "index_map_locations_on_proposal_id", using: :btree
create_table "milestone_statuses", force: :cascade do |t|
t.string "name"
t.text "description"
t.datetime "hidden_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "milestone_statuses", ["hidden_at"], name: "index_milestone_statuses_on_hidden_at", using: :btree
create_table "milestone_translations", force: :cascade do |t|
t.integer "milestone_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "title"
t.text "description"
end
add_index "milestone_translations", ["locale"], name: "index_milestone_translations_on_locale", using: :btree
add_index "milestone_translations", ["milestone_id"], name: "index_milestone_translations_on_milestone_id", using: :btree
create_table "milestones", force: :cascade do |t|
t.integer "milestoneable_id"
t.string "milestoneable_type"
t.string "title", limit: 80
t.text "description"
t.datetime "publication_date"
t.integer "status_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "milestones", ["status_id"], name: "index_milestones_on_status_id", using: :btree
create_table "moderators", force: :cascade do |t|
t.integer "user_id"
end
@@ -1087,6 +1188,26 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "polls", ["related_type", "related_id"], name: "index_polls_on_related_type_and_related_id", using: :btree
add_index "polls", ["starts_at", "ends_at"], name: "index_polls_on_starts_at_and_ends_at", using: :btree
create_table "progress_bar_translations", force: :cascade do |t|
t.integer "progress_bar_id", null: false
t.string "locale", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "title"
end
add_index "progress_bar_translations", ["locale"], name: "index_progress_bar_translations_on_locale", using: :btree
add_index "progress_bar_translations", ["progress_bar_id"], name: "index_progress_bar_translations_on_progress_bar_id", using: :btree
create_table "progress_bars", force: :cascade do |t|
t.integer "kind"
t.integer "percentage"
t.integer "progressable_id"
t.string "progressable_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "proposal_notifications", force: :cascade do |t|
t.string "title"
t.text "body"
@@ -1289,15 +1410,15 @@ ActiveRecord::Schema.define(version: 20190108133246) do
add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
create_table "tags", force: :cascade do |t|
t.string "name", limit: 40
t.integer "taggings_count", default: 0
t.integer "debates_count", default: 0
t.integer "proposals_count", default: 0
t.integer "spending_proposals_count", default: 0
t.string "name", limit: 160
t.integer "taggings_count", default: 0
t.integer "debates_count", default: 0
t.integer "proposals_count", default: 0
t.integer "spending_proposals_count", default: 0
t.string "kind"
t.integer "budget/investments_count", default: 0
t.integer "legislation/proposals_count", default: 0
t.integer "legislation/processes_count", default: 0
t.integer "budget/investments_count", default: 0
t.integer "legislation/proposals_count", default: 0
t.integer "legislation/processes_count", default: 0
end
add_index "tags", ["debates_count"], name: "index_tags_on_debates_count", using: :btree
@@ -1500,11 +1621,15 @@ ActiveRecord::Schema.define(version: 20190108133246) do
t.string "link_text"
t.string "link_url"
t.string "label"
t.boolean "header", default: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "header", default: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "site_customization_page_id"
t.integer "columns", default: 4
end
add_index "widget_cards", ["site_customization_page_id"], name: "index_widget_cards_on_site_customization_page_id", using: :btree
create_table "widget_feeds", force: :cascade do |t|
t.string "kind"
t.integer "limit", default: 3
@@ -1513,8 +1638,6 @@ ActiveRecord::Schema.define(version: 20190108133246) do
end
add_foreign_key "administrators", "users"
add_foreign_key "annotations", "legacy_legislations"
add_foreign_key "annotations", "users"
add_foreign_key "budget_investments", "communities"
add_foreign_key "dashboard_administrator_tasks", "users"
add_foreign_key "dashboard_executed_actions", "dashboard_actions", column: "action_id"