mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: add a way to map arbitrary urls to a topic, post, or category. Useful for sites that have migrated to Discourse and want to redirect from their old site to Discourse with 301 redirects.
This commit is contained in:
14
db/migrate/20140828172407_create_permalinks.rb
Normal file
14
db/migrate/20140828172407_create_permalinks.rb
Normal file
@ -0,0 +1,14 @@
|
||||
class CreatePermalinks < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :permalinks do |t|
|
||||
t.string :url, null: false
|
||||
t.integer :topic_id
|
||||
t.integer :post_id
|
||||
t.integer :category_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :permalinks, :url
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user