From 1d1b1aa4c5ab934adc0367dfe3382dbd0757cf62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2020 06:14:35 +0000 Subject: [PATCH 01/37] Bump acorn from 5.7.3 to 5.7.4 Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4) Signed-off-by: dependabot[bot] --- package-lock.json | 36 ++++++++++++++++++++++++++++++------ yarn.lock | 6 +++--- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index f900886c..25af43fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1253,6 +1253,30 @@ "@babel/runtime": "^7.4.4" } }, + "@material-ui/lab": { + "version": "4.0.0-alpha.46", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.46.tgz", + "integrity": "sha512-JGgZmj1UNP8bbYNAGvndipjXRK3x2+9mFBzbX7MyCj+WpfnJbeqTmJK2No9MXvPj/EZJ1piaKif46FdDc4U93A==", + "requires": { + "@babel/runtime": "^7.4.4", + "@material-ui/utils": "^4.9.6", + "clsx": "^1.0.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0" + }, + "dependencies": { + "@material-ui/utils": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.9.6.tgz", + "integrity": "sha512-gqlBn0JPPTUZeAktn1rgMcy9Iczrr74ecx31tyZLVGdBGGzsxzM6PP6zeS7FuoLS6vG4hoZP7hWnOoHtkR0Kvw==", + "requires": { + "@babel/runtime": "^7.4.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0" + } + } + } + }, "@material-ui/styles": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.9.0.tgz", @@ -2674,9 +2698,9 @@ } }, "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==" + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" }, "acorn-globals": { "version": "4.3.4", @@ -8312,9 +8336,9 @@ }, "dependencies": { "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "ws": { diff --git a/yarn.lock b/yarn.lock index d8bb6751..243227fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1855,9 +1855,9 @@ acorn-walk@^6.0.1: integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== acorn@^5.5.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + version "5.7.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" + integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== acorn@^6.0.1, acorn@^6.2.1: version "6.4.0" From ef28e453d230aa90cc9b3719cab891794f18cabe Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2020 06:15:04 +0000 Subject: [PATCH 02/37] Bump pg from 1.2.2 to 1.2.3 Bumps [pg](https://github.com/ged/ruby-pg) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/ged/ruby-pg/releases) - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc) - [Commits](https://github.com/ged/ruby-pg/commits) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4bda390a..61f9be02 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1276,7 +1276,7 @@ GEM faraday (~> 0.15) faraday_middleware (~> 0.12) paypalhttp (1.0.0) - pg (1.2.2) + pg (1.2.3) pry (0.13.0) coderay (~> 1.1) method_source (~> 1.0) From 9280c5f9eeb60b136a5460cd82d11959f85fedfd Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Wed, 25 Mar 2020 21:05:08 -0500 Subject: [PATCH 03/37] add formatted document view link --- app/views/layouts/_document_navbar.html.erb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_document_navbar.html.erb b/app/views/layouts/_document_navbar.html.erb index 16dae4b9..27379059 100644 --- a/app/views/layouts/_document_navbar.html.erb +++ b/app/views/layouts/_document_navbar.html.erb @@ -59,6 +59,12 @@ <% end %>
  • +
  • + <%= link_to @document, target: '_blank' do %> + <%= Document.icon %> + View formatted document + <% end %> +
  • <%= link_to analysis_document_path(@document) do %> bar_chart @@ -67,7 +73,7 @@
  • <%= link_to '#', class: 'modal-trigger', data: { target: 'document-notes-modal' } do %> - <%= Document.icon %> + edit Open document notes <% end %>
  • From b81cb0cc3bdd7c2880b3b688f49dcbbda0f831d8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2020 05:38:02 +0000 Subject: [PATCH 04/37] Bump sidekiq from 6.0.5 to 6.0.6 Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.0.5 to 6.0.6. - [Release notes](https://github.com/mperham/sidekiq/releases) - [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md) - [Commits](https://github.com/mperham/sidekiq/compare/v6.0.5...v6.0.6) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 068733cf..e69153df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1431,7 +1431,7 @@ GEM shellany (0.0.1) shoulda-matchers (4.3.0) activesupport (>= 4.2.0) - sidekiq (6.0.5) + sidekiq (6.0.6) connection_pool (>= 2.2.2) rack (~> 2.0) rack-protection (>= 2.0.0) From a8f0c54867b00f70706d6f287834d5073f0634a2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2020 05:39:14 +0000 Subject: [PATCH 05/37] Bump guard from 2.16.1 to 2.16.2 Bumps [guard](https://github.com/guard/guard) from 2.16.1 to 2.16.2. - [Release notes](https://github.com/guard/guard/releases) - [Commits](https://github.com/guard/guard/compare/v2.16.1...v2.16.2) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 068733cf..d57dd8b4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1127,7 +1127,7 @@ GEM gherkin (5.1.0) globalid (0.4.2) activesupport (>= 4.2.0) - guard (2.16.1) + guard (2.16.2) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) @@ -1211,7 +1211,7 @@ GEM loofah (2.4.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.13) + lumberjack (1.2.4) mail (2.7.1) mini_mime (>= 0.1.1) marcel (0.3.3) @@ -1355,7 +1355,7 @@ GEM rake (13.0.1) rb-fsevent (0.10.3) rb-gravatar (1.0.5) - rb-inotify (0.10.0) + rb-inotify (0.10.1) ffi (~> 1.0) react-rails (2.6.1) babel-transpiler (>= 0.7.0) From c51d308e755b8601deeacba0d027f60e59eb2a79 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2020 05:39:49 +0000 Subject: [PATCH 06/37] Bump ibm_watson from 1.3.0 to 1.3.1 Bumps [ibm_watson](https://github.com/watson-developer-cloud/ruby-sdk) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/watson-developer-cloud/ruby-sdk/releases) - [Changelog](https://github.com/watson-developer-cloud/ruby-sdk/blob/master/.releaserc) - [Commits](https://github.com/watson-developer-cloud/ruby-sdk/compare/v1.3.0...v1.3.1) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 068733cf..b41b842d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1158,7 +1158,7 @@ GEM http_parser.rb (~> 0.6.0) http-cookie (1.0.3) domain_name (~> 0.5) - http-form_data (2.2.0) + http-form_data (2.3.0) http_parser.rb (0.6.0) i18n (1.8.2) concurrent-ruby (~> 1.0) @@ -1166,7 +1166,7 @@ GEM concurrent-ruby (~> 1.0) http (~> 4.1.0) jwt (~> 2.2.1) - ibm_watson (1.3.0) + ibm_watson (1.3.1) concurrent-ruby (~> 1.0) eventmachine (~> 1.2) faye-websocket (~> 0.10) From 2e8cbd3126c81f27585089e58ae60cad3d1c0f1f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2020 05:40:45 +0000 Subject: [PATCH 07/37] Bump active_storage_validations from 0.8.7 to 0.8.8 Bumps [active_storage_validations](https://github.com/igorkasyanchuk/active_storage_validations) from 0.8.7 to 0.8.8. - [Release notes](https://github.com/igorkasyanchuk/active_storage_validations/releases) - [Changelog](https://github.com/igorkasyanchuk/active_storage_validations/blob/master/CHANGES.md) - [Commits](https://github.com/igorkasyanchuk/active_storage_validations/commits) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 068733cf..67642ab0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,7 +79,7 @@ GEM rails-html-sanitizer (~> 1.1, >= 1.2.0) active_record_union (1.3.0) activerecord (>= 4.0) - active_storage_validations (0.8.7) + active_storage_validations (0.8.8) rails (>= 5.2.0) activejob (6.0.2.1) activesupport (= 6.0.2.1) From e183987f0fb6884dd0822aa3be6005e362e5cc15 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 03:44:09 -0500 Subject: [PATCH 08/37] potential tag error fix --- app/controllers/content_controller.rb | 2 +- lib/tasks/data_integrity.rake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index 4227bd38..b511f704 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -501,7 +501,7 @@ class ContentController < ApplicationController .downcase .to_sym - params.require(content_class).permit(content_param_list + [:deleted_at, :document_entity_id]) + params.require(content_class).except(:page_tags, :_destroy).permit(content_param_list + [:deleted_at, :document_entity_id]) end def page_tag_params diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 7eb41408..fc28e67b 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -52,10 +52,12 @@ namespace :data_integrity do page_type_data.each do |relation, relation_data| klass = relation_data[:related_class] reference_id = relation_data[:through_relation].to_s + '_id' + puts "Klass is #{klass.name}" + puts "Reference ID is #{reference_id}" orphans = klass.where({"#{reference_id}": nil}) puts "Orphans for relation #{relation_data[:with]}: #{orphans.count} -- deleting them all!" - orphans.destroy_all! + orphans.destroy_all end end end From 3e60b7eca7f5b6a3e4a7e05329e3a7c1cd9285da Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 14:21:06 -0500 Subject: [PATCH 09/37] migrate filter on created_at instead of updated_at --- app/services/temporary_field_migration_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index a86e6bf2..f6b9e84d 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -11,7 +11,7 @@ class TemporaryFieldMigrationService < Service def self.migrate_fields_for_content(content_model, user) return unless content_model.present? && user.present? return unless content_model.user == user - return if content_model.persisted? && content_model.updated_at > 'May 1, 2018'.to_datetime + return if content_model.persisted? && content_model.created_at > 'May 1, 2018'.to_datetime # todo we might be able to do this in a single left outer join attribute_categories = content_model.class.attribute_categories(content_model.user) From bd32f4cccef9c5362e4005b27ca9c0a75a93bfdf Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 14:54:57 -0500 Subject: [PATCH 10/37] add column migration flag --- ...mn_migration_flag_to_all_content_models.rb | 62 +++ db/schema.rb | 454 +++++++++++++++++- 2 files changed, 511 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20200326193201_add_column_migration_flag_to_all_content_models.rb diff --git a/db/migrate/20200326193201_add_column_migration_flag_to_all_content_models.rb b/db/migrate/20200326193201_add_column_migration_flag_to_all_content_models.rb new file mode 100644 index 00000000..136e16ff --- /dev/null +++ b/db/migrate/20200326193201_add_column_migration_flag_to_all_content_models.rb @@ -0,0 +1,62 @@ +class AddColumnMigrationFlagToAllContentModels < ActiveRecord::Migration[6.0] + def change + add_column(:universes, :columns_migrated_from_old_style, :boolean) + add_column(:characters, :columns_migrated_from_old_style, :boolean) + add_column(:locations, :columns_migrated_from_old_style, :boolean) + add_column(:items, :columns_migrated_from_old_style, :boolean) + add_column(:buildings, :columns_migrated_from_old_style, :boolean) + add_column(:conditions, :columns_migrated_from_old_style, :boolean) + add_column(:continents, :columns_migrated_from_old_style, :boolean) + add_column(:countries, :columns_migrated_from_old_style, :boolean) + add_column(:creatures, :columns_migrated_from_old_style, :boolean) + add_column(:deities, :columns_migrated_from_old_style, :boolean) + add_column(:floras, :columns_migrated_from_old_style, :boolean) + add_column(:foods, :columns_migrated_from_old_style, :boolean) + add_column(:governments, :columns_migrated_from_old_style, :boolean) + add_column(:groups, :columns_migrated_from_old_style, :boolean) + add_column(:jobs, :columns_migrated_from_old_style, :boolean) + add_column(:landmarks, :columns_migrated_from_old_style, :boolean) + add_column(:languages, :columns_migrated_from_old_style, :boolean) + add_column(:magics, :columns_migrated_from_old_style, :boolean) + add_column(:planets, :columns_migrated_from_old_style, :boolean) + add_column(:races, :columns_migrated_from_old_style, :boolean) + add_column(:religions, :columns_migrated_from_old_style, :boolean) + add_column(:scenes, :columns_migrated_from_old_style, :boolean) + add_column(:schools, :columns_migrated_from_old_style, :boolean) + add_column(:sports, :columns_migrated_from_old_style, :boolean) + add_column(:technologies, :columns_migrated_from_old_style, :boolean) + add_column(:towns, :columns_migrated_from_old_style, :boolean) + add_column(:traditions, :columns_migrated_from_old_style, :boolean) + add_column(:vehicles, :columns_migrated_from_old_style, :boolean) + + change_column_default(:universes, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:characters, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:locations, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:items, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:buildings, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:conditions, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:continents, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:countries, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:creatures, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:deities, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:floras, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:foods, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:governments, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:groups, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:jobs, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:landmarks, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:languages, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:magics, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:planets, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:races, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:religions, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:scenes, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:schools, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:sports, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:technologies, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:towns, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:traditions, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + change_column_default(:vehicles, :columns_migrated_from_old_style, {:from=>nil, :to=>true}) + + end +end diff --git a/db/schema.rb b/db/schema.rb index de7c3ccc..6d31ba18 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_03_02_022930) do +ActiveRecord::Schema.define(version: 2020_03_26_193201) do create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false @@ -54,6 +54,8 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "authorization_callback_url" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false + t.string "event_ping_url" + t.string "application_token" t.index ["user_id"], name: "index_application_integrations_on_user_id" end @@ -201,6 +203,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_buildings_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_buildings_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_buildings_on_user_id" @@ -354,6 +357,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Character" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_characters_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_characters_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_characters_on_deleted_at_and_user_id" @@ -381,6 +385,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_conditions_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_conditions_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_conditions_on_user_id" @@ -511,6 +516,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", precision: 6, null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id", "universe_id"], name: "index_continents_on_deleted_at_and_id_and_universe_id" t.index ["deleted_at", "id", "user_id"], name: "index_continents_on_deleted_at_and_id_and_user_id" t.index ["deleted_at", "id"], name: "index_continents_on_deleted_at_and_id" @@ -554,6 +560,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Country" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_countries_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_countries_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_countries_on_deleted_at_and_user_id" @@ -711,6 +718,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Creature" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_creatures_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_creatures_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_creatures_on_deleted_at_and_user_id" @@ -755,6 +763,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Deity" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_deities_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_deities_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_deities_on_deleted_at_and_user_id" @@ -1057,6 +1066,11 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.integer "universe_id" t.boolean "favorite" t.text "notes_text" + t.string "subtitle" + t.string "format" + t.string "genre" + t.integer "word_count" + t.string "status" t.index ["universe_id", "deleted_at"], name: "index_documents_on_universe_id_and_deleted_at" t.index ["universe_id"], name: "index_documents_on_universe_id" t.index ["user_id"], name: "index_documents_on_user_id" @@ -1135,6 +1149,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Flora" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_floras_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_floras_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_floras_on_deleted_at_and_user_id" @@ -1156,6 +1171,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_foods_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_foods_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_foods_on_user_id" @@ -1274,6 +1290,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Government" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_governments_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_governments_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_governments_on_deleted_at_and_user_id" @@ -1369,6 +1386,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Group" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_groups_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_groups_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_groups_on_deleted_at_and_user_id" @@ -1394,12 +1412,23 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.string "src_file_name" t.string "src_content_type" - t.integer "src_file_size" + t.bigint "src_file_size" t.datetime "src_updated_at" t.index ["content_type", "content_id"], name: "index_image_uploads_on_content_type_and_content_id" t.index ["user_id"], name: "index_image_uploads_on_user_id" end + create_table "integration_authorizations", force: :cascade do |t| + t.integer "user_id", null: false + t.integer "application_integration_id", null: false + t.string "referral_url" + t.string "ip_address" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["application_integration_id"], name: "index_integration_authorizations_on_application_integration_id" + t.index ["user_id"], name: "index_integration_authorizations_on_user_id" + end + create_table "item_magics", force: :cascade do |t| t.integer "item_id" t.integer "magic_id" @@ -1433,6 +1462,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Item" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_items_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_items_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_items_on_deleted_at_and_user_id" @@ -1454,6 +1484,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_jobs_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_jobs_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_jobs_on_user_id" @@ -1528,6 +1559,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Landmark" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_landmarks_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_landmarks_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_landmarks_on_deleted_at_and_user_id" @@ -1559,6 +1591,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Language" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_languages_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_languages_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_languages_on_deleted_at_and_user_id" @@ -1672,6 +1705,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Location" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_locations_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_locations_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_locations_on_deleted_at_and_user_id" @@ -1682,6 +1716,324 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.index ["user_id"], name: "index_locations_on_user_id" end + create_table "lore_believers", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "believer_id" + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_believers_on_lore_id" + t.index ["user_id"], name: "index_lore_believers_on_user_id" + end + + create_table "lore_buildings", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "building_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["building_id"], name: "index_lore_buildings_on_building_id" + t.index ["lore_id"], name: "index_lore_buildings_on_lore_id" + t.index ["user_id"], name: "index_lore_buildings_on_user_id" + end + + create_table "lore_characters", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "character_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["character_id"], name: "index_lore_characters_on_character_id" + t.index ["lore_id"], name: "index_lore_characters_on_lore_id" + t.index ["user_id"], name: "index_lore_characters_on_user_id" + end + + create_table "lore_conditions", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "condition_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["condition_id"], name: "index_lore_conditions_on_condition_id" + t.index ["lore_id"], name: "index_lore_conditions_on_lore_id" + t.index ["user_id"], name: "index_lore_conditions_on_user_id" + end + + create_table "lore_continents", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "continent_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["continent_id"], name: "index_lore_continents_on_continent_id" + t.index ["lore_id"], name: "index_lore_continents_on_lore_id" + t.index ["user_id"], name: "index_lore_continents_on_user_id" + end + + create_table "lore_countries", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "country_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["country_id"], name: "index_lore_countries_on_country_id" + t.index ["lore_id"], name: "index_lore_countries_on_lore_id" + t.index ["user_id"], name: "index_lore_countries_on_user_id" + end + + create_table "lore_created_traditions", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "created_tradition_id" + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_created_traditions_on_lore_id" + t.index ["user_id"], name: "index_lore_created_traditions_on_user_id" + end + + create_table "lore_creatures", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "creature_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["creature_id"], name: "index_lore_creatures_on_creature_id" + t.index ["lore_id"], name: "index_lore_creatures_on_lore_id" + t.index ["user_id"], name: "index_lore_creatures_on_user_id" + end + + create_table "lore_deities", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "deity_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["deity_id"], name: "index_lore_deities_on_deity_id" + t.index ["lore_id"], name: "index_lore_deities_on_lore_id" + t.index ["user_id"], name: "index_lore_deities_on_user_id" + end + + create_table "lore_floras", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "flora_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["flora_id"], name: "index_lore_floras_on_flora_id" + t.index ["lore_id"], name: "index_lore_floras_on_lore_id" + t.index ["user_id"], name: "index_lore_floras_on_user_id" + end + + create_table "lore_foods", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "food_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["food_id"], name: "index_lore_foods_on_food_id" + t.index ["lore_id"], name: "index_lore_foods_on_lore_id" + t.index ["user_id"], name: "index_lore_foods_on_user_id" + end + + create_table "lore_governments", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "government_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["government_id"], name: "index_lore_governments_on_government_id" + t.index ["lore_id"], name: "index_lore_governments_on_lore_id" + t.index ["user_id"], name: "index_lore_governments_on_user_id" + end + + create_table "lore_groups", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "group_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["group_id"], name: "index_lore_groups_on_group_id" + t.index ["lore_id"], name: "index_lore_groups_on_lore_id" + t.index ["user_id"], name: "index_lore_groups_on_user_id" + end + + create_table "lore_jobs", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "job_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["job_id"], name: "index_lore_jobs_on_job_id" + t.index ["lore_id"], name: "index_lore_jobs_on_lore_id" + t.index ["user_id"], name: "index_lore_jobs_on_user_id" + end + + create_table "lore_landmarks", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "landmark_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["landmark_id"], name: "index_lore_landmarks_on_landmark_id" + t.index ["lore_id"], name: "index_lore_landmarks_on_lore_id" + t.index ["user_id"], name: "index_lore_landmarks_on_user_id" + end + + create_table "lore_magics", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "magic_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_magics_on_lore_id" + t.index ["magic_id"], name: "index_lore_magics_on_magic_id" + t.index ["user_id"], name: "index_lore_magics_on_user_id" + end + + create_table "lore_original_languages", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "original_language_id" + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_original_languages_on_lore_id" + t.index ["user_id"], name: "index_lore_original_languages_on_user_id" + end + + create_table "lore_planets", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "planet_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_planets_on_lore_id" + t.index ["planet_id"], name: "index_lore_planets_on_planet_id" + t.index ["user_id"], name: "index_lore_planets_on_user_id" + end + + create_table "lore_races", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "race_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_races_on_lore_id" + t.index ["race_id"], name: "index_lore_races_on_race_id" + t.index ["user_id"], name: "index_lore_races_on_user_id" + end + + create_table "lore_related_lores", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "related_lore_id" + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_related_lores_on_lore_id" + t.index ["user_id"], name: "index_lore_related_lores_on_user_id" + end + + create_table "lore_religions", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "religion_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_religions_on_lore_id" + t.index ["religion_id"], name: "index_lore_religions_on_religion_id" + t.index ["user_id"], name: "index_lore_religions_on_user_id" + end + + create_table "lore_schools", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "school_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_schools_on_lore_id" + t.index ["school_id"], name: "index_lore_schools_on_school_id" + t.index ["user_id"], name: "index_lore_schools_on_user_id" + end + + create_table "lore_sports", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "sport_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_sports_on_lore_id" + t.index ["sport_id"], name: "index_lore_sports_on_sport_id" + t.index ["user_id"], name: "index_lore_sports_on_user_id" + end + + create_table "lore_technologies", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "technology_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_technologies_on_lore_id" + t.index ["technology_id"], name: "index_lore_technologies_on_technology_id" + t.index ["user_id"], name: "index_lore_technologies_on_user_id" + end + + create_table "lore_towns", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "town_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_towns_on_lore_id" + t.index ["town_id"], name: "index_lore_towns_on_town_id" + t.index ["user_id"], name: "index_lore_towns_on_user_id" + end + + create_table "lore_traditions", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "tradition_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_traditions_on_lore_id" + t.index ["tradition_id"], name: "index_lore_traditions_on_tradition_id" + t.index ["user_id"], name: "index_lore_traditions_on_user_id" + end + + create_table "lore_variations", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "variation_id" + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_variations_on_lore_id" + t.index ["user_id"], name: "index_lore_variations_on_user_id" + end + + create_table "lore_vehicles", force: :cascade do |t| + t.integer "lore_id", null: false + t.integer "vehicle_id", null: false + t.integer "user_id", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lore_id"], name: "index_lore_vehicles_on_lore_id" + t.index ["user_id"], name: "index_lore_vehicles_on_user_id" + t.index ["vehicle_id"], name: "index_lore_vehicles_on_vehicle_id" + end + + create_table "lores", force: :cascade do |t| + t.string "name" + t.integer "user_id", null: false + t.integer "universe_id", null: false + t.datetime "deleted_at" + t.datetime "archived_at" + t.string "privacy" + t.boolean "favorite" + t.string "page_type", default: "Lore" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["universe_id"], name: "index_lores_on_universe_id" + t.index ["user_id"], name: "index_lores_on_user_id" + end + create_table "magic_deityships", force: :cascade do |t| t.integer "user_id" t.integer "magic_id" @@ -1713,6 +2065,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Magic" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_magics_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_magics_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_magics_on_deleted_at_and_user_id" @@ -2009,6 +2362,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Planet" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_planets_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_planets_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_planets_on_deleted_at_and_user_id" @@ -2062,6 +2416,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Race" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_races_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_races_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_races_on_deleted_at_and_user_id" @@ -2135,6 +2490,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Religion" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_religions_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_religions_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_religions_on_deleted_at_and_user_id" @@ -2200,6 +2556,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Scene" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_scenes_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_scenes_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_scenes_on_deleted_at_and_user_id" @@ -2221,6 +2578,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_schools_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_schools_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_schools_on_user_id" @@ -2258,6 +2616,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_sports_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_sports_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_sports_on_user_id" @@ -2321,6 +2680,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Technology" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_technologies_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_technologies_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_technologies_on_deleted_at_and_user_id" @@ -2759,6 +3119,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Town" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["deleted_at", "id"], name: "index_towns_on_deleted_at_and_id" t.index ["deleted_at", "universe_id"], name: "index_towns_on_deleted_at_and_universe_id" t.index ["deleted_at", "user_id"], name: "index_towns_on_deleted_at_and_user_id" @@ -2779,6 +3140,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_traditions_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_traditions_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_traditions_on_user_id" @@ -2802,6 +3164,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.string "page_type", default: "Universe" t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index "\"user_id\", \"universe_id\", \"deleted_at\"", name: "index_universes_on_user_id_and_universe_id_and_deleted_at" t.index ["deleted_at", "id"], name: "index_universes_on_deleted_at_and_id" t.index ["deleted_at", "user_id"], name: "index_universes_on_deleted_at_and_user_id" @@ -2879,6 +3242,7 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.datetime "updated_at", null: false t.datetime "archived_at" t.boolean "favorite" + t.boolean "columns_migrated_from_old_style", default: true t.index ["universe_id"], name: "index_vehicles_on_universe_id" t.index ["user_id", "universe_id", "deleted_at"], name: "index_vehicles_on_user_id_and_universe_id_and_deleted_at" t.index ["user_id"], name: "index_vehicles_on_user_id" @@ -2908,9 +3272,6 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do t.integer "habitat_id" end - add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" - add_foreign_key "api_keys", "users" - add_foreign_key "application_integrations", "users" add_foreign_key "buildings", "universes" add_foreign_key "buildings", "users" add_foreign_key "character_birthtowns", "characters" @@ -3057,6 +3418,8 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do add_foreign_key "group_creatures", "groups" add_foreign_key "group_creatures", "users" add_foreign_key "image_uploads", "users" + add_foreign_key "integration_authorizations", "application_integrations" + add_foreign_key "integration_authorizations", "users" add_foreign_key "item_magics", "items" add_foreign_key "item_magics", "magics" add_foreign_key "item_magics", "users" @@ -3082,6 +3445,87 @@ ActiveRecord::Schema.define(version: 2020_03_02_022930) do add_foreign_key "location_largest_towns", "users" add_foreign_key "location_notable_towns", "locations" add_foreign_key "location_notable_towns", "users" + add_foreign_key "lore_believers", "lores" + add_foreign_key "lore_believers", "users" + add_foreign_key "lore_buildings", "buildings" + add_foreign_key "lore_buildings", "lores" + add_foreign_key "lore_buildings", "users" + add_foreign_key "lore_characters", "characters" + add_foreign_key "lore_characters", "lores" + add_foreign_key "lore_characters", "users" + add_foreign_key "lore_conditions", "conditions" + add_foreign_key "lore_conditions", "lores" + add_foreign_key "lore_conditions", "users" + add_foreign_key "lore_continents", "continents" + add_foreign_key "lore_continents", "lores" + add_foreign_key "lore_continents", "users" + add_foreign_key "lore_countries", "countries" + add_foreign_key "lore_countries", "lores" + add_foreign_key "lore_countries", "users" + add_foreign_key "lore_created_traditions", "lores" + add_foreign_key "lore_created_traditions", "users" + add_foreign_key "lore_creatures", "creatures" + add_foreign_key "lore_creatures", "lores" + add_foreign_key "lore_creatures", "users" + add_foreign_key "lore_deities", "deities" + add_foreign_key "lore_deities", "lores" + add_foreign_key "lore_deities", "users" + add_foreign_key "lore_floras", "floras" + add_foreign_key "lore_floras", "lores" + add_foreign_key "lore_floras", "users" + add_foreign_key "lore_foods", "foods" + add_foreign_key "lore_foods", "lores" + add_foreign_key "lore_foods", "users" + add_foreign_key "lore_governments", "governments" + add_foreign_key "lore_governments", "lores" + add_foreign_key "lore_governments", "users" + add_foreign_key "lore_groups", "groups" + add_foreign_key "lore_groups", "lores" + add_foreign_key "lore_groups", "users" + add_foreign_key "lore_jobs", "jobs" + add_foreign_key "lore_jobs", "lores" + add_foreign_key "lore_jobs", "users" + add_foreign_key "lore_landmarks", "landmarks" + add_foreign_key "lore_landmarks", "lores" + add_foreign_key "lore_landmarks", "users" + add_foreign_key "lore_magics", "lores" + add_foreign_key "lore_magics", "magics" + add_foreign_key "lore_magics", "users" + add_foreign_key "lore_original_languages", "lores" + add_foreign_key "lore_original_languages", "users" + add_foreign_key "lore_planets", "lores" + add_foreign_key "lore_planets", "planets" + add_foreign_key "lore_planets", "users" + add_foreign_key "lore_races", "lores" + add_foreign_key "lore_races", "races" + add_foreign_key "lore_races", "users" + add_foreign_key "lore_related_lores", "lores" + add_foreign_key "lore_related_lores", "users" + add_foreign_key "lore_religions", "lores" + add_foreign_key "lore_religions", "religions" + add_foreign_key "lore_religions", "users" + add_foreign_key "lore_schools", "lores" + add_foreign_key "lore_schools", "schools" + add_foreign_key "lore_schools", "users" + add_foreign_key "lore_sports", "lores" + add_foreign_key "lore_sports", "sports" + add_foreign_key "lore_sports", "users" + add_foreign_key "lore_technologies", "lores" + add_foreign_key "lore_technologies", "technologies" + add_foreign_key "lore_technologies", "users" + add_foreign_key "lore_towns", "lores" + add_foreign_key "lore_towns", "towns" + add_foreign_key "lore_towns", "users" + add_foreign_key "lore_traditions", "lores" + add_foreign_key "lore_traditions", "traditions" + add_foreign_key "lore_traditions", "users" + add_foreign_key "lore_variations", "lores" + add_foreign_key "lore_variations", "users" + add_foreign_key "lore_vehicles", "lores" + add_foreign_key "lore_vehicles", "users" + add_foreign_key "lore_vehicles", "vehicles" + add_foreign_key "lores", "universes" + add_foreign_key "lores", "users" add_foreign_key "notice_dismissals", "users" add_foreign_key "page_tags", "users" add_foreign_key "paypal_invoices", "page_unlock_promo_codes" From 4a70b882c3b3c8207910a09012840d3c1d1eae1d Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 15:02:57 -0500 Subject: [PATCH 11/37] use flag --- app/services/temporary_field_migration_service.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index f6b9e84d..018d54aa 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -8,10 +8,11 @@ class TemporaryFieldMigrationService < Service end end - def self.migrate_fields_for_content(content_model, user) + def self.migrate_fields_for_content(content_model, user, force: false) return unless content_model.present? && user.present? return unless content_model.user == user - return if content_model.persisted? && content_model.created_at > 'May 1, 2018'.to_datetime + return if !force && content_model.persisted? && content_model.created_at > 'May 1, 2018'.to_datetime + return if !!content_model.columns_migrated_from_old_style # todo we might be able to do this in a single left outer join attribute_categories = content_model.class.attribute_categories(content_model.user) From a4ca8cfc5fced3b98234b29845d096f174f84dcd Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 15:55:51 -0500 Subject: [PATCH 12/37] integrity --- app/models/page_groupers/supergroupship.rb | 2 +- app/services/temporary_field_migration_service.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/page_groupers/supergroupship.rb b/app/models/page_groupers/supergroupship.rb index 5a730cf3..ce058fe9 100644 --- a/app/models/page_groupers/supergroupship.rb +++ b/app/models/page_groupers/supergroupship.rb @@ -18,6 +18,6 @@ class Supergroupship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.supergroup_id) - other_object.subgroups.delete this_object + other_object.subgroups.delete(this_object) if other_object.present? end end diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index f6b9e84d..e3ca3859 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -44,6 +44,9 @@ class TemporaryFieldMigrationService < Service if existing_value && existing_value.created_at != existing_value.updated_at next end + if existing_value.value.present? + next + end if content_model.respond_to?(attribute_field.old_column_source) value_from_model = content_model.send(attribute_field.old_column_source) From 9e0249f7a9b83f70d43ddc51b326ea24389331a4 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 18:24:04 -0500 Subject: [PATCH 13/37] two-way link fixes --- app/models/page_groupers/group_allyship.rb | 2 +- app/models/page_groupers/group_enemyship.rb | 2 +- app/models/page_groupers/sistergroupship.rb | 2 +- app/models/page_groupers/subgroupship.rb | 2 +- app/models/page_groupers/technology_child_technology.rb | 2 +- app/models/page_groupers/technology_parent_technology.rb | 2 +- app/models/page_groupers/technology_related_technology.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/page_groupers/group_allyship.rb b/app/models/page_groupers/group_allyship.rb index a63382e1..4e3e00c8 100644 --- a/app/models/page_groupers/group_allyship.rb +++ b/app/models/page_groupers/group_allyship.rb @@ -15,6 +15,6 @@ class GroupAllyship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.ally_id) - other_object.allies.delete this_object + other_object.allies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/group_enemyship.rb b/app/models/page_groupers/group_enemyship.rb index d3f2972e..d0cb01d4 100644 --- a/app/models/page_groupers/group_enemyship.rb +++ b/app/models/page_groupers/group_enemyship.rb @@ -15,6 +15,6 @@ class GroupEnemyship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.enemy_id) - other_object.enemies.delete this_object + other_object.enemies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/sistergroupship.rb b/app/models/page_groupers/sistergroupship.rb index 464e3825..01a7543f 100644 --- a/app/models/page_groupers/sistergroupship.rb +++ b/app/models/page_groupers/sistergroupship.rb @@ -15,6 +15,6 @@ class Sistergroupship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.sistergroup_id) - other_object.sistergroups.delete this_object + other_object.sistergroups.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/subgroupship.rb b/app/models/page_groupers/subgroupship.rb index 22bb06c7..e1aa651e 100644 --- a/app/models/page_groupers/subgroupship.rb +++ b/app/models/page_groupers/subgroupship.rb @@ -18,6 +18,6 @@ class Subgroupship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.subgroup_id) - other_object.supergroups.delete(this_object) + other_object.supergroups.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/technology_child_technology.rb b/app/models/page_groupers/technology_child_technology.rb index 3816ef0d..decf5dc6 100644 --- a/app/models/page_groupers/technology_child_technology.rb +++ b/app/models/page_groupers/technology_child_technology.rb @@ -20,6 +20,6 @@ class TechnologyChildTechnology < ApplicationRecord this_object = Technology.find_by(id: self.technology_id) other_object = Technology.find_by(id: self.child_technology_id) - other_object.parent_technologies.delete(this_object) + other_object.parent_technologies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/technology_parent_technology.rb b/app/models/page_groupers/technology_parent_technology.rb index ec51bb46..1147ed6f 100644 --- a/app/models/page_groupers/technology_parent_technology.rb +++ b/app/models/page_groupers/technology_parent_technology.rb @@ -20,6 +20,6 @@ class TechnologyParentTechnology < ApplicationRecord this_object = Technology.find_by(id: self.technology_id) other_object = Technology.find_by(id: self.parent_technology_id) - other_object.child_technologies.delete(this_object) + other_object.child_technologies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/technology_related_technology.rb b/app/models/page_groupers/technology_related_technology.rb index e8c18772..5a4f73ee 100644 --- a/app/models/page_groupers/technology_related_technology.rb +++ b/app/models/page_groupers/technology_related_technology.rb @@ -14,6 +14,6 @@ class TechnologyRelatedTechnology < ApplicationRecord this_object = Technology.find_by(id: self.technology_id) other_object = Technology.find_by(id: self.related_technology_id) - other_object.related_technologies.delete(this_object) + other_object.related_technologies.delete(this_object) if other_object.present? end end From a44b5825e2e754fc94445c036bd3719d138981fc Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 18:35:12 -0500 Subject: [PATCH 14/37] a bit more brittleness detection --- app/services/temporary_field_migration_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index e3ca3859..98cdf1f1 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -44,7 +44,7 @@ class TemporaryFieldMigrationService < Service if existing_value && existing_value.created_at != existing_value.updated_at next end - if existing_value.value.present? + if existing_value.try(:value).present? next end From 25f20c95228c6e3941f1653bea74c4c5ab41ba4f Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 19:00:41 -0500 Subject: [PATCH 15/37] add migration rake task --- app/services/temporary_field_migration_service.rb | 2 ++ lib/tasks/data_integrity.rake | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index 1ebd3e75..d0df420d 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -72,5 +72,7 @@ class TemporaryFieldMigrationService < Service end end end + + content_model.update(columns_migrated_from_old_style: true) end end diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index fc28e67b..a4161983 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -61,5 +61,18 @@ namespace :data_integrity do end end end + + desc "Migrate old content and mark it as migrated once and for all" + task migrate_old_content: :environment do + RECORDS_TO_PROCESS = 1000 + + Rails.application.config.content_types[:all].each do |content_type| + pages = content_type.where(columns_migrated_from_old_style: nil).order('updated_at DESC').limit(RECORDS_TO_PROCESS) + + pages.find_each do |page| + TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user) + end + end + end end From a8b229688397f829fe7f9dda06733a022fce9dc5 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 19:06:59 -0500 Subject: [PATCH 16/37] rake task --- lib/tasks/data_integrity.rake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index a4161983..bffef8f8 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -64,15 +64,21 @@ namespace :data_integrity do desc "Migrate old content and mark it as migrated once and for all" task migrate_old_content: :environment do - RECORDS_TO_PROCESS = 1000 + RECORDS_TO_PROCESS = 100 Rails.application.config.content_types[:all].each do |content_type| pages = content_type.where(columns_migrated_from_old_style: nil).order('updated_at DESC').limit(RECORDS_TO_PROCESS) pages.find_each do |page| - TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user) + TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user, force: true) end end + + puts "Pages remaining to migrate: " + Rails.application.config.content_types[:all].each do |content_type| + count = content_type.where(columns_migrated_from_old_style: nil).count + puts "#{content_type.name}: #{count}" + end end end From 37baf03b4d9b231971e39b74199f1213c8840991 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 19:40:38 -0500 Subject: [PATCH 17/37] first runthrough --- app/services/temporary_field_migration_service.rb | 2 +- lib/tasks/data_integrity.rake | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index d0df420d..dc01d5ca 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -45,7 +45,7 @@ class TemporaryFieldMigrationService < Service if existing_value && existing_value.created_at != existing_value.updated_at next end - if existing_value.value.present? + if existing_value.try(:value).present? next end diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index bffef8f8..dbddfb2e 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -67,6 +67,7 @@ namespace :data_integrity do RECORDS_TO_PROCESS = 100 Rails.application.config.content_types[:all].each do |content_type| + puts "Migrating #{content_type.name}" pages = content_type.where(columns_migrated_from_old_style: nil).order('updated_at DESC').limit(RECORDS_TO_PROCESS) pages.find_each do |page| @@ -77,7 +78,7 @@ namespace :data_integrity do puts "Pages remaining to migrate: " Rails.application.config.content_types[:all].each do |content_type| count = content_type.where(columns_migrated_from_old_style: nil).count - puts "#{content_type.name}: #{count}" + puts "#{content_type.name}: #{count} (#{content_type.where.not(columns_migrated_from_old_style: nil).count} migrated)" end end end From 85299e1fcfecde905c623e9457c4296f91253575 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 19:55:30 -0500 Subject: [PATCH 18/37] don't find_each here since it clobbers our sorting --- lib/tasks/data_integrity.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index dbddfb2e..4eefec4a 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -70,7 +70,7 @@ namespace :data_integrity do puts "Migrating #{content_type.name}" pages = content_type.where(columns_migrated_from_old_style: nil).order('updated_at DESC').limit(RECORDS_TO_PROCESS) - pages.find_each do |page| + pages.each do |page| TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user, force: true) end end From 23c777e6b766317e102551600e4f3ace872cb790 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 20:01:43 -0500 Subject: [PATCH 19/37] disable logger during migration --- lib/tasks/data_integrity.rake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 4eefec4a..7d899c6a 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -66,6 +66,9 @@ namespace :data_integrity do task migrate_old_content: :environment do RECORDS_TO_PROCESS = 100 + old_logger = ActiveRecord::Base.logger + ActiveRecord::Base.logger = nil + Rails.application.config.content_types[:all].each do |content_type| puts "Migrating #{content_type.name}" pages = content_type.where(columns_migrated_from_old_style: nil).order('updated_at DESC').limit(RECORDS_TO_PROCESS) @@ -80,6 +83,8 @@ namespace :data_integrity do count = content_type.where(columns_migrated_from_old_style: nil).count puts "#{content_type.name}: #{count} (#{content_type.where.not(columns_migrated_from_old_style: nil).count} migrated)" end + + ActiveRecord::Base.logger = old_logger end end From b3612ccfd225a7f9ce46dbf9fb599767b0c1d8f4 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 26 Mar 2020 22:29:49 -0500 Subject: [PATCH 20/37] debugs --- .../temporary_field_migration_service.rb | 4 ++-- lib/tasks/data_integrity.rake | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index dc01d5ca..3ab284f9 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -2,9 +2,9 @@ # to the new-style of having values in an associated Attribute model. # Once all data has been moved over, we can remove these old columns and delete this service. class TemporaryFieldMigrationService < Service - def self.migrate_all_content_for_user(user) + def self.migrate_all_content_for_user(user, force: false) user.content_list.each do |content| - self.migrate_fields_for_content(content, user) + self.migrate_fields_for_content(content, user, force: force) end end diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 7d899c6a..471ba7a6 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -64,6 +64,8 @@ namespace :data_integrity do desc "Migrate old content and mark it as migrated once and for all" task migrate_old_content: :environment do + require 'pry' + RECORDS_TO_PROCESS = 100 old_logger = ActiveRecord::Base.logger @@ -71,9 +73,10 @@ namespace :data_integrity do Rails.application.config.content_types[:all].each do |content_type| puts "Migrating #{content_type.name}" - pages = content_type.where(columns_migrated_from_old_style: nil).order('updated_at DESC').limit(RECORDS_TO_PROCESS) + pages = content_type.where(columns_migrated_from_old_style: nil).limit(RECORDS_TO_PROCESS) pages.each do |page| + binding.pry if page.columns_migrated_from_old_style.true? TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user, force: true) end end @@ -86,5 +89,19 @@ namespace :data_integrity do ActiveRecord::Base.logger = old_logger end + + desc "Migrate old content per user" + task migrate_old_content_per_user: :environment do + START_ID = 1 + USERS_TO_PROCESS = 100 + + users = User.where(id: START_ID..(START_ID+USERS_TO_PROCESS)) + puts "Processing #{users.count} users" + + users.each do |user| + TemporaryFieldMigrationService.migrate_all_content_for_user(user) + end + + end end From 44971e8d6b97ab46e12426d825bdc04274eb7bb5 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 27 Mar 2020 00:21:08 -0500 Subject: [PATCH 21/37] remove pry --- lib/tasks/data_integrity.rake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 471ba7a6..b920d8cb 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -64,8 +64,6 @@ namespace :data_integrity do desc "Migrate old content and mark it as migrated once and for all" task migrate_old_content: :environment do - require 'pry' - RECORDS_TO_PROCESS = 100 old_logger = ActiveRecord::Base.logger @@ -76,7 +74,7 @@ namespace :data_integrity do pages = content_type.where(columns_migrated_from_old_style: nil).limit(RECORDS_TO_PROCESS) pages.each do |page| - binding.pry if page.columns_migrated_from_old_style.true? + puts "Hey, this page shouldn't be here!" if page.columns_migrated_from_old_style.true? TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user, force: true) end end From 2e36b546e2d657462721320ddb309b11cdf47730 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 27 Mar 2020 00:29:32 -0500 Subject: [PATCH 22/37] why isn't this working --- lib/tasks/data_integrity.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index b920d8cb..b5cc8aae 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -74,8 +74,10 @@ namespace :data_integrity do pages = content_type.where(columns_migrated_from_old_style: nil).limit(RECORDS_TO_PROCESS) pages.each do |page| - puts "Hey, this page shouldn't be here!" if page.columns_migrated_from_old_style.true? + puts "Hey, this page shouldn't be here!" if page.columns_migrated_from_old_style == true TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user, force: true) + + page.update(columns_migrated_from_old_style: true) unless page.reload.columns_migrated_from_old_style == true end end From 883be62577962493c3aba509f0a9a9b1dc1e1978 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 27 Mar 2020 13:40:38 -0500 Subject: [PATCH 23/37] increase records processed per cycle --- app/services/temporary_field_migration_service.rb | 2 +- lib/tasks/data_integrity.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index 3ab284f9..2710687e 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -12,7 +12,7 @@ class TemporaryFieldMigrationService < Service return unless content_model.present? && user.present? return unless content_model.user == user return if !force && content_model.persisted? && content_model.created_at > 'May 1, 2018'.to_datetime - return if !!content_model.columns_migrated_from_old_style + return if !!content_model.columns_migrated_from_old_style? # todo we might be able to do this in a single left outer join attribute_categories = content_model.class.attribute_categories(content_model.user) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index b5cc8aae..a58af74c 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -93,7 +93,7 @@ namespace :data_integrity do desc "Migrate old content per user" task migrate_old_content_per_user: :environment do START_ID = 1 - USERS_TO_PROCESS = 100 + USERS_TO_PROCESS = 300 users = User.where(id: START_ID..(START_ID+USERS_TO_PROCESS)) puts "Processing #{users.count} users" From 209b43e0c4249d47f6b61c7d60991cec855ab154 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 27 Mar 2020 13:51:24 -0500 Subject: [PATCH 24/37] a bit more progress reporting --- lib/tasks/data_integrity.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index a58af74c..a491b4d8 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -70,8 +70,8 @@ namespace :data_integrity do ActiveRecord::Base.logger = nil Rails.application.config.content_types[:all].each do |content_type| - puts "Migrating #{content_type.name}" pages = content_type.where(columns_migrated_from_old_style: nil).limit(RECORDS_TO_PROCESS) + puts "Migrating #{content_type.name} (#{pages.count} pages)" pages.each do |page| puts "Hey, this page shouldn't be here!" if page.columns_migrated_from_old_style == true From 64eba500b8f5f976c28895eb6fbc0ca11c31a989 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 27 Mar 2020 14:41:58 -0500 Subject: [PATCH 25/37] whoopsies --- lib/tasks/data_integrity.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index a491b4d8..775c3a91 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -64,7 +64,7 @@ namespace :data_integrity do desc "Migrate old content and mark it as migrated once and for all" task migrate_old_content: :environment do - RECORDS_TO_PROCESS = 100 + RECORDS_TO_PROCESS = 300 old_logger = ActiveRecord::Base.logger ActiveRecord::Base.logger = nil @@ -93,7 +93,7 @@ namespace :data_integrity do desc "Migrate old content per user" task migrate_old_content_per_user: :environment do START_ID = 1 - USERS_TO_PROCESS = 300 + USERS_TO_PROCESS = 500 users = User.where(id: START_ID..(START_ID+USERS_TO_PROCESS)) puts "Processing #{users.count} users" From a1b27e63ab0e45b1c5fd758b8b1a1ccbcc5cf41c Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 27 Mar 2020 19:33:29 -0500 Subject: [PATCH 26/37] skip validations on migration flag --- app/services/temporary_field_migration_service.rb | 2 +- lib/tasks/data_integrity.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/temporary_field_migration_service.rb b/app/services/temporary_field_migration_service.rb index 2710687e..e7b0e969 100644 --- a/app/services/temporary_field_migration_service.rb +++ b/app/services/temporary_field_migration_service.rb @@ -73,6 +73,6 @@ class TemporaryFieldMigrationService < Service end end - content_model.update(columns_migrated_from_old_style: true) + content_model.update_column(:columns_migrated_from_old_style, true) end end diff --git a/lib/tasks/data_integrity.rake b/lib/tasks/data_integrity.rake index 775c3a91..5908dc7e 100644 --- a/lib/tasks/data_integrity.rake +++ b/lib/tasks/data_integrity.rake @@ -77,7 +77,7 @@ namespace :data_integrity do puts "Hey, this page shouldn't be here!" if page.columns_migrated_from_old_style == true TemporaryFieldMigrationService.migrate_fields_for_content(page, page.user, force: true) - page.update(columns_migrated_from_old_style: true) unless page.reload.columns_migrated_from_old_style == true + page.update_column(:columns_migrated_from_old_style, true) unless page.reload.columns_migrated_from_old_style == true end end From 2d5cdddfe97aa301b969e2ca77b71f2394e6f82e Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sat, 28 Mar 2020 20:21:19 -0500 Subject: [PATCH 27/37] allow dismissing associations banner --- app/controllers/users_controller.rb | 4 ++-- app/models/concerns/has_content.rb | 2 +- .../content/panels/_associations.html.erb | 18 +++++++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index baa9e0ef..264de990 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -12,8 +12,8 @@ class UsersController < ApplicationController @content = @user.public_content.select { |type, list| list.any? } @tabs = @content.keys - @accent_color = @user.favorite_page_type_color - @accent_icon = @user.favorite_page_type_icon + @accent_color = @user.favorite_page_type_color + @accent_icon = @user.favorite_page_type_icon @favorite_content = @user.favorite_page_type? ? @user.send(@user.favorite_page_type.downcase.pluralize).is_public : [] # todo this is really bad and needs redone/improved diff --git a/app/models/concerns/has_content.rb b/app/models/concerns/has_content.rb index 8e8c65c7..92a58489 100644 --- a/app/models/concerns/has_content.rb +++ b/app/models/concerns/has_content.rb @@ -123,7 +123,7 @@ module HasContent .first(limit) @user_recent_content_list = recently_changed_attributes.map do |entity_type, entity_id| - entity_type.constantize.find_by(id: entity_id) + entity_type.constantize.find_by(id: entity_id) rescue nil end.compact end diff --git a/app/views/content/panels/_associations.html.erb b/app/views/content/panels/_associations.html.erb index aa23938b..ba2bce1d 100644 --- a/app/views/content/panels/_associations.html.erb +++ b/app/views/content/panels/_associations.html.erb @@ -12,11 +12,19 @@
    -
    - help - These associations are automatically created whenever you add another page to this universe.
    - Only you can see this message. <%= link_to 'Dismiss this message', '#' %>. -
    + <% if current_user.notice_dismissals.where(notice_id: 7).none? %> +
    +
    + <%= link_to prepay_path, class: 'black-text' do %> + help + These associations are automatically created whenever you add another page to this universe. + Only you can see this message. + + <%= link_to 'Dismiss this notice.', notice_dismissal_dismiss_path(notice_id: 7), class: 'blue-text' %> + <% end %> +
    +
    + <% end %> <% relations.each do |name, params| %> <% From 66d17e7c009cd474a8a6a6ffad54d22db18e3ce8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2020 06:08:58 +0000 Subject: [PATCH 28/37] Bump capybara from 3.31.0 to 3.32.0 Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.31.0 to 3.32.0. - [Release notes](https://github.com/teamcapybara/capybara/releases) - [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md) - [Commits](https://github.com/teamcapybara/capybara/compare/3.31.0...3.32.0) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 068733cf..c083d6e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1028,7 +1028,7 @@ GEM bundler-audit (0.6.1) bundler (>= 1.2.0, < 3) thor (~> 0.18) - capybara (3.31.0) + capybara (3.32.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -1365,7 +1365,7 @@ GEM tilt redcarpet (3.5.0) redis (4.1.3) - regexp_parser (1.6.0) + regexp_parser (1.7.0) remotipart (1.4.4) responders (3.0.0) actionpack (>= 5.0) From 07047b0870d18b772c4dcea79be5420d08e16338 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2020 06:09:57 +0000 Subject: [PATCH 29/37] Bump rmagick from 4.0.0 to 4.1.1 Bumps [rmagick](https://github.com/rmagick/rmagick) from 4.0.0 to 4.1.1. - [Release notes](https://github.com/rmagick/rmagick/releases) - [Changelog](https://github.com/rmagick/rmagick/blob/master/CHANGELOG.md) - [Commits](https://github.com/rmagick/rmagick/commits) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 068733cf..0bc9b607 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1372,7 +1372,7 @@ GEM railties (>= 5.0) rexml (3.2.4) rinku (2.0.6) - rmagick (4.0.0) + rmagick (4.1.1) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) From b14bbc9be341d24c44f63da59af3c09851fb9af9 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 30 Mar 2020 01:36:27 -0500 Subject: [PATCH 30/37] fix 500 for guests --- app/views/content/panels/_associations.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content/panels/_associations.html.erb b/app/views/content/panels/_associations.html.erb index ba2bce1d..372c9380 100644 --- a/app/views/content/panels/_associations.html.erb +++ b/app/views/content/panels/_associations.html.erb @@ -12,7 +12,7 @@
    - <% if current_user.notice_dismissals.where(notice_id: 7).none? %> + <% if user_signed_in? && current_user.notice_dismissals.where(notice_id: 7).none? %>
    <%= link_to prepay_path, class: 'black-text' do %> From 57ceb83a164e54f910a7a2db95fdeb648fa8cea6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2020 05:44:57 +0000 Subject: [PATCH 31/37] Bump rubocop from 0.80.1 to 0.81.0 Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.80.1 to 0.81.0. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.80.1...v0.81.0) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 922431b3..6482e96b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1267,7 +1267,7 @@ GEM parallel (1.19.1) paranoia (2.4.2) activerecord (>= 4.0, < 6.1) - parser (2.7.0.3) + parser (2.7.0.5) ast (~> 2.4.0) paypal-checkout-sdk (1.0.3) paypalhttp (~> 1.0.0) @@ -1397,14 +1397,14 @@ GEM rspec-mocks (~> 3.9) rspec-support (~> 3.9) rspec-support (3.9.2) - rubocop (0.80.1) + rubocop (0.81.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) rexml ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) + unicode-display_width (>= 1.4.0, < 2.0) ruby-prof (1.3.1) ruby-progressbar (1.10.1) ruby-vips (2.0.17) @@ -1477,7 +1477,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.6) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) uniform_notifier (1.13.0) warden (1.2.8) rack (>= 2.0.6) From 4a662f4d773a63fea4561698155db355666686a3 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 3 Apr 2020 13:04:58 -0500 Subject: [PATCH 32/37] Add some safety checking around image_processing avatar processing https://github.com/janko/image_processing/issues/66#issuecomment-608573201 --- app/models/users/user.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/models/users/user.rb b/app/models/users/user.rb index b61caa18..701e9952 100644 --- a/app/models/users/user.rb +++ b/app/models/users/user.rb @@ -152,12 +152,18 @@ class User < ApplicationRecord Rails.application.routes.url_helpers.rails_representation_url(avatar.variant(resize_to_limit: [size, size]).processed, only_path: true) else # otherwise, grab the default from Gravatar for this email address - require 'digest/md5' # todo do we actually need to require this all the time? - email_md5 = Digest::MD5.hexdigest(email.downcase) - "https://www.gravatar.com/avatar/#{email_md5}?d=identicon&s=#{size}".html_safe + gravatar_fallback_url end rescue ActiveStorage::FileNotFoundError + gravatar_fallback_url + + rescue ImageProcessing::Error + gravatar_fallback_url + end + + def gravatar_fallback_url + require 'digest/md5' # todo do we actually need to require this all the time? email_md5 = Digest::MD5.hexdigest(email.downcase) "https://www.gravatar.com/avatar/#{email_md5}?d=identicon&s=#{size}".html_safe end From 197a097011257b953c5fd59d18e2d62886832a6c Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 3 Apr 2020 13:15:21 -0500 Subject: [PATCH 33/37] big whoops --- app/models/users/user.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/users/user.rb b/app/models/users/user.rb index 701e9952..adec01e4 100644 --- a/app/models/users/user.rb +++ b/app/models/users/user.rb @@ -152,17 +152,17 @@ class User < ApplicationRecord Rails.application.routes.url_helpers.rails_representation_url(avatar.variant(resize_to_limit: [size, size]).processed, only_path: true) else # otherwise, grab the default from Gravatar for this email address - gravatar_fallback_url + gravatar_fallback_url(size) end rescue ActiveStorage::FileNotFoundError - gravatar_fallback_url + gravatar_fallback_url(size) rescue ImageProcessing::Error - gravatar_fallback_url + gravatar_fallback_url(size) end - def gravatar_fallback_url + def gravatar_fallback_url(size=80) require 'digest/md5' # todo do we actually need to require this all the time? email_md5 = Digest::MD5.hexdigest(email.downcase) "https://www.gravatar.com/avatar/#{email_md5}?d=identicon&s=#{size}".html_safe From d1d1e17a39fe781b09ae8528084ad300f22bcfa5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 05:59:47 +0000 Subject: [PATCH 34/37] Bump database_cleaner from 1.8.3 to 1.8.4 Bumps [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/DatabaseCleaner/database_cleaner/releases) - [Changelog](https://github.com/DatabaseCleaner/database_cleaner/blob/master/History.rdoc) - [Commits](https://github.com/DatabaseCleaner/database_cleaner/compare/v1.8.3...v1.8.4) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 922431b3..146d3b33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1080,7 +1080,7 @@ GEM cucumber-wire (0.0.1) d3-rails (5.9.2) railties (>= 3.1) - database_cleaner (1.8.3) + database_cleaner (1.8.4) dateslices (0.0.4) rails (> 4) db_text_search (0.3.1) From 401037a02f53382e7f7f535206b65e1995cee056 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 06:01:18 +0000 Subject: [PATCH 35/37] Bump aws-sdk-s3 from 1.61.1 to 1.61.2 Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.61.1 to 1.61.2. - [Release notes](https://github.com/aws/aws-sdk-ruby/releases) - [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-s3/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-ruby/commits) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 922431b3..02e9f601 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,7 +116,7 @@ GEM autoprefixer-rails (9.7.4) execjs aws-eventstream (1.0.3) - aws-partitions (1.283.0) + aws-partitions (1.294.0) aws-sdk (3.0.1) aws-sdk-resources (~> 3) aws-sdk-accessanalyzer (1.1.0) @@ -275,7 +275,7 @@ GEM aws-sdk-connectparticipant (1.0.0) aws-sdk-core (~> 3, >= 3.71.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.91.1) + aws-sdk-core (3.92.0) aws-eventstream (~> 1.0, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) @@ -875,7 +875,7 @@ GEM aws-sdk-route53resolver (1.11.0) aws-sdk-core (~> 3, >= 3.71.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.61.1) + aws-sdk-s3 (1.61.2) aws-sdk-core (~> 3, >= 3.83.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) From a4c373e9337b29c375d4384cf384f7a4ba2bdfe5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 06:02:29 +0000 Subject: [PATCH 36/37] Bump capybara from 3.32.0 to 3.32.1 Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.32.0 to 3.32.1. - [Release notes](https://github.com/teamcapybara/capybara/releases) - [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md) - [Commits](https://github.com/teamcapybara/capybara/compare/3.32.0...3.32.1) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 922431b3..b9f6750a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1028,7 +1028,7 @@ GEM bundler-audit (0.6.1) bundler (>= 1.2.0, < 3) thor (~> 0.18) - capybara (3.32.0) + capybara (3.32.1) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -1280,7 +1280,7 @@ GEM pry (0.13.0) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (4.0.3) + public_suffix (4.0.4) puma (4.3.3) nio4r (~> 2.0) puma-heroku (1.1.0) From f4b4c8f770202b40126ab58eb035094204eb6e0c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2020 07:52:58 +0000 Subject: [PATCH 37/37] Bump rails from 6.0.2.1 to 6.0.2.2 Bumps [rails](https://github.com/rails/rails) from 6.0.2.1 to 6.0.2.2. - [Release notes](https://github.com/rails/rails/releases) - [Commits](https://github.com/rails/rails/compare/v6.0.2.1...v6.0.2.2) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 104 +++++++++++++++++++++++++-------------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cd155c44..3056a8c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,38 +41,38 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.0.2.1) - actionpack (= 6.0.2.1) + actioncable (6.0.2.2) + actionpack (= 6.0.2.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.2.1) - actionpack (= 6.0.2.1) - activejob (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + actionmailbox (6.0.2.2) + actionpack (= 6.0.2.2) + activejob (= 6.0.2.2) + activerecord (= 6.0.2.2) + activestorage (= 6.0.2.2) + activesupport (= 6.0.2.2) mail (>= 2.7.1) - actionmailer (6.0.2.1) - actionpack (= 6.0.2.1) - actionview (= 6.0.2.1) - activejob (= 6.0.2.1) + actionmailer (6.0.2.2) + actionpack (= 6.0.2.2) + actionview (= 6.0.2.2) + activejob (= 6.0.2.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.2.1) - actionview (= 6.0.2.1) - activesupport (= 6.0.2.1) + actionpack (6.0.2.2) + actionview (= 6.0.2.2) + activesupport (= 6.0.2.2) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.2.1) - actionpack (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + actiontext (6.0.2.2) + actionpack (= 6.0.2.2) + activerecord (= 6.0.2.2) + activestorage (= 6.0.2.2) + activesupport (= 6.0.2.2) nokogiri (>= 1.8.5) - actionview (6.0.2.1) - activesupport (= 6.0.2.1) + actionview (6.0.2.2) + activesupport (= 6.0.2.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -81,24 +81,24 @@ GEM activerecord (>= 4.0) active_storage_validations (0.8.8) rails (>= 5.2.0) - activejob (6.0.2.1) - activesupport (= 6.0.2.1) + activejob (6.0.2.2) + activesupport (= 6.0.2.2) globalid (>= 0.3.6) - activemodel (6.0.2.1) - activesupport (= 6.0.2.1) + activemodel (6.0.2.2) + activesupport (= 6.0.2.2) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.0.2.1) - activemodel (= 6.0.2.1) - activesupport (= 6.0.2.1) - activestorage (6.0.2.1) - actionpack (= 6.0.2.1) - activejob (= 6.0.2.1) - activerecord (= 6.0.2.1) + activerecord (6.0.2.2) + activemodel (= 6.0.2.2) + activesupport (= 6.0.2.2) + activestorage (6.0.2.2) + actionpack (= 6.0.2.2) + activejob (= 6.0.2.2) + activerecord (= 6.0.2.2) marcel (~> 0.3.1) - activesupport (6.0.2.1) + activesupport (6.0.2.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -1208,7 +1208,7 @@ GEM listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.4.0) + loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.4) @@ -1299,20 +1299,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.2.1) - actioncable (= 6.0.2.1) - actionmailbox (= 6.0.2.1) - actionmailer (= 6.0.2.1) - actionpack (= 6.0.2.1) - actiontext (= 6.0.2.1) - actionview (= 6.0.2.1) - activejob (= 6.0.2.1) - activemodel (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + rails (6.0.2.2) + actioncable (= 6.0.2.2) + actionmailbox (= 6.0.2.2) + actionmailer (= 6.0.2.2) + actionpack (= 6.0.2.2) + actiontext (= 6.0.2.2) + actionview (= 6.0.2.2) + activejob (= 6.0.2.2) + activemodel (= 6.0.2.2) + activerecord (= 6.0.2.2) + activestorage (= 6.0.2.2) + activesupport (= 6.0.2.2) bundler (>= 1.3.0) - railties (= 6.0.2.1) + railties (= 6.0.2.2) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.4) actionpack (>= 5.0.1.x) @@ -1345,9 +1345,9 @@ GEM sassc-rails (>= 1.3, < 3) rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (6.0.2.1) - actionpack (= 6.0.2.1) - activesupport (= 6.0.2.1) + railties (6.0.2.2) + actionpack (= 6.0.2.2) + activesupport (= 6.0.2.2) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -1468,7 +1468,7 @@ GEM tilt (2.0.10) timeago_js (3.0.2.2) tribute (3.6.0.0) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) tzinfo-data (1.2019.3) tzinfo (>= 1.0.0)