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:
evazion
2019-10-23 14:23:03 -05:00
parent f54885b72e
commit 9f0ecf7247
7 changed files with 178 additions and 1 deletions

View 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