Implentation for #2141
This commit is contained in:
10
db/migrate/20140505000956_add_other_names_to_wiki_pages.rb
Normal file
10
db/migrate/20140505000956_add_other_names_to_wiki_pages.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class AddOtherNamesToWikiPages < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :wiki_pages, :other_names, :text
|
||||
add_column :wiki_pages, :other_names_index, :tsvector
|
||||
add_column :wiki_page_versions, :other_names, :text
|
||||
|
||||
execute "CREATE INDEX index_wiki_pages_on_other_names_index ON wiki_pages USING GIN (other_names_index)"
|
||||
execute "CREATE TRIGGER trigger_wiki_pages_on_update_for_other_names BEFORE INSERT OR UPDATE ON wiki_pages FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('other_names_index', 'public.danbooru', 'other_names')"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user