summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-25 17:49:34 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-25 17:49:34 +0200
commit7f26a8202556db3a584f1360950a671d2a60a1ea (patch)
tree1e37bb2eaa941ed0dbe2591c67cc850409d1658e /db/migrate
parent5f8cc4fa269dadc895d99eec9ef3a82b17c5890a (diff)
Upgrade to Rails 5.2.8.1 on Ruby 2.5.8
- Bump rails 4.2.11.3 → 5.2.8.1, ruby 2.4.10 → 2.5.8 - Upgrade acts-as-taggable-on ~> 3.5 → ~> 6.0 - Upgrade exception_notification ~> 4.4 → ~> 4.5 - Upgrade globalize ~> 5.0 → ~> 5.2.0 - Upgrade pg ~> 0.17 → ~> 1.0 - Upgrade sass-rails ~> 4.0 → ~> 5.0 - Upgrade libxml-ruby to ~> 3.2 (5.x requires Ruby 3.2+) - Pin awesome_nested_set ~> 3.4.0 (3.9 has lft/rgt update bug) - Add rails-controller-testing gem - Add assets initializer for jquery precompile - Add acts_as_taggable missing indexes migration - Set eager_load, serve_static_files, active_record settings
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb b/db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb
new file mode 100644
index 0000000..7c39589
--- /dev/null
+++ b/db/migrate/20260625031409_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb
@@ -0,0 +1,23 @@
1# This migration comes from acts_as_taggable_on_engine (originally 6)
2if ActiveRecord.gem_version >= Gem::Version.new('5.0')
3 class AddMissingIndexesOnTaggings < ActiveRecord::Migration[4.2]; end
4else
5 class AddMissingIndexesOnTaggings < ActiveRecord::Migration; end
6end
7AddMissingIndexesOnTaggings.class_eval do
8 def change
9 add_index ActsAsTaggableOn.taggings_table, :tag_id unless index_exists? ActsAsTaggableOn.taggings_table, :tag_id
10 add_index ActsAsTaggableOn.taggings_table, :taggable_id unless index_exists? ActsAsTaggableOn.taggings_table, :taggable_id
11 add_index ActsAsTaggableOn.taggings_table, :taggable_type unless index_exists? ActsAsTaggableOn.taggings_table, :taggable_type
12 add_index ActsAsTaggableOn.taggings_table, :tagger_id unless index_exists? ActsAsTaggableOn.taggings_table, :tagger_id
13 add_index ActsAsTaggableOn.taggings_table, :context unless index_exists? ActsAsTaggableOn.taggings_table, :context
14
15 unless index_exists? ActsAsTaggableOn.taggings_table, [:tagger_id, :tagger_type]
16 add_index ActsAsTaggableOn.taggings_table, [:tagger_id, :tagger_type]
17 end
18
19 unless index_exists? ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
20 add_index ActsAsTaggableOn.taggings_table, [:taggable_id, :taggable_type, :tagger_id, :context], name: 'taggings_idy'
21 end
22 end
23end