2017-08-31 00:06:56 -04:00
|
|
|
class CreatePermalinks < ActiveRecord::Migration[4.2]
|
2014-08-28 15:09:36 -04:00
|
|
|
def change
|
|
|
|
create_table :permalinks do |t|
|
|
|
|
t.string :url, null: false
|
|
|
|
t.integer :topic_id
|
|
|
|
t.integer :post_id
|
|
|
|
t.integer :category_id
|
|
|
|
|
2017-08-07 11:48:36 -04:00
|
|
|
t.timestamps null: false
|
2014-08-28 15:09:36 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
add_index :permalinks, :url
|
|
|
|
end
|
|
|
|
end
|