-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add searchable_created_at field to pg_search_documents table
Add an additional timestamp to pg_search_documents table to store the created_at of the page. This timestamp is interesting, if the documents are order or filtered by time.
- Loading branch information
1 parent
21049ae
commit 27e7f94
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
db/migrate/20241105092236_add_document_created_at_to_pg_search_documents.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AddDocumentCreatedAtToPgSearchDocuments < ActiveRecord::Migration[7.1] | ||
def change | ||
add_column :pg_search_documents, :searchable_created_at, :datetime, if_not_exists: true | ||
add_index :pg_search_documents, :searchable_created_at, if_not_exists: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters