Fix index.

This commit is contained in:
chiu committed 2024-08-17 11:35:38 +08:00
1 parent 68cba0a1f7
commit 334a1c7e69
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -22,8 +22,8 @@ class ColumnEntry
belongs_to :table_column, index: true
I18n.available_locales.each do |locale|
index({text: 1}, { collation: {locale: locale.to_s}, unique: false, background: true })
index({content: 1}, { collation: {locale: locale.to_s}, unique: false, background: true })
index({"text.#{locale}" => 1}, { unique: false, background: true })
index({"content.#{locale}" => 1}, { unique: false, background: true })
end
+1 -1
View File
@@ -14,7 +14,7 @@ class TableEntry
accepts_nested_attributes_for :column_entries, :allow_destroy => true
I18n.available_locales.each do |locale|
index({have_data: 1}, { collation: {locale: locale.to_s}, unique: false, background: true })
index({"have_data.#{locale}" => 1}, { unique: false, background: true })
end
before_save do