Files
danbooru/db/migrate/20191023191749_create_dtext_links.rb
evazion 9f0ecf7247 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.
2019-10-23 21:36:48 -05:00

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