dtext links: add table for tracking links between wikis.
Add a dtext_links table for tracking links between wiki pages. This is to allow for broken link detection and "what links here" searches, among other uses.
This commit is contained in:
13
db/migrate/20191023191749_create_dtext_links.rb
Normal file
13
db/migrate/20191023191749_create_dtext_links.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateDtextLinks < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :dtext_links do |t|
|
||||
t.timestamps
|
||||
t.references :model, polymorphic: true, null: false
|
||||
t.integer :link_type, null: false
|
||||
t.string :link_target, null: false
|
||||
|
||||
t.index :link_type
|
||||
t.index :link_target, opclass: "text_pattern_ops"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user