Create search indexes

This commit is contained in:
Kevin McConnell
2024-10-02 11:39:15 +01:00
parent a3aef3b869
commit b3a8e9c904
2 changed files with 12 additions and 1 deletions
@@ -0,0 +1,6 @@
class CreateSearchIndexes < ActiveRecord::Migration[8.0]
def change
create_virtual_table :bubbles_search_index, "fts5", [ "title" ]
create_virtual_table :comments_search_index, "fts5", [ "body" ]
end
end
Generated
+6 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2024_10_01_200953) do
ActiveRecord::Schema[8.0].define(version: 2024_10_02_103608) do
create_table "accesses", force: :cascade do |t|
t.integer "bucket_id", null: false
t.integer "user_id", null: false
@@ -148,4 +148,9 @@ ActiveRecord::Schema[8.0].define(version: 2024_10_01_200953) do
add_foreign_key "taggings", "bubbles"
add_foreign_key "taggings", "tags"
add_foreign_key "users", "accounts"
# Virtual tables defined in this database.
# Note that virtual tables may not work with other database engines. Be careful if changing database.
create_virtual_table "bubbles_search_index", "fts5", ["title"]
create_virtual_table "comments_search_index", "fts5", ["body"]
end