mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							15 lines
						
					
					
						
							806 B
						
					
					
				
			
		
		
	
	
							15 lines
						
					
					
						
							806 B
						
					
					
				| # frozen_string_literal: true
 | |
| 
 | |
| class AddNgramToSearchIndex < ActiveRecord::Migration[8.0]
 | |
|   def change
 | |
|     add_column :search_entries, :ngram, :tsvector
 | |
| 
 | |
|     add_index :search_entries, %i[account_id ngram], using: :gin, where: "record_type = 'Submitter'",
 | |
|                                                      name: 'index_search_entries_on_account_id_ngram_submitter'
 | |
|     add_index :search_entries, %i[account_id ngram], using: :gin, where: "record_type = 'Submission'",
 | |
|                                                      name: 'index_search_entries_on_account_id_ngram_submission'
 | |
|     add_index :search_entries, %i[account_id ngram], using: :gin, where: "record_type = 'Template'",
 | |
|                                                      name: 'index_search_entries_on_account_id_ngram_template'
 | |
|   end
 | |
| end
 |