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.
14 lines
362 B
Ruby
14 lines
362 B
Ruby
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
|