forked from AlchemyCMS/alchemy-pg_search
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is possible to remove pages from the index that have a disabled searchable - flag. This is the companion commit to the PR in Alchemy CMS. Reference: AlchemyCMS/alchemy_cms#2414
- Loading branch information
1 parent
cb97ce9
commit 56fa13c
Showing
7 changed files
with
62 additions
and
3 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
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
14 changes: 14 additions & 0 deletions
14
...grate/20230119143813_restrict_on_delete_page_id_foreign_key_from_alchemy_nodes.alchemy.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,14 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from alchemy (originally 20220514072456) | ||
|
||
class RestrictOnDeletePageIdForeignKeyFromAlchemyNodes < ActiveRecord::Migration[6.0] | ||
def up | ||
remove_foreign_key :alchemy_nodes, :alchemy_pages | ||
add_foreign_key :alchemy_nodes, :alchemy_pages, column: :page_id, on_delete: :restrict | ||
end | ||
|
||
def down | ||
remove_foreign_key :alchemy_nodes, :alchemy_pages | ||
add_foreign_key :alchemy_nodes, :alchemy_pages, column: :page_id, on_delete: :cascade | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
spec/dummy/db/migrate/20230119143814_add_playsinline_to_alchemy_essence_videos.alchemy.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,10 @@ | ||
# frozen_string_literal: true | ||
# This migration comes from alchemy (originally 20220622130905) | ||
|
||
class AddPlaysinlineToAlchemyEssenceVideos < ActiveRecord::Migration[6.0] | ||
def change | ||
return if column_exists?(:alchemy_essence_videos, :playsinline) | ||
|
||
add_column :alchemy_essence_videos, :playsinline, :boolean, default: false, null: false | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
spec/dummy/db/migrate/20230119143815_add_searchable_to_alchemy_pages.alchemy.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,8 @@ | ||
# This migration comes from alchemy (originally 20230119112425) | ||
class AddSearchableToAlchemyPages < ActiveRecord::Migration[6.0] | ||
def change | ||
return if column_exists?(:alchemy_pages, :searchable) | ||
|
||
add_column :alchemy_pages, :searchable, :boolean, default: true, null: false | ||
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