Add support for commenting on changesets with RSS feeds and email notification of comments to other commenters and people that have chosen to subscribe to a changeset.
16 lines
571 B
Ruby
16 lines
571 B
Ruby
require 'migrate'
|
|
|
|
class CreateChangesetComments < ActiveRecord::Migration
|
|
def change
|
|
create_table :changeset_comments do |t|
|
|
t.column :changeset_id, :bigint, :null => false
|
|
t.column :author_id, :bigint, :null => false
|
|
t.text :body, :null => false
|
|
t.timestamp :created_at, :null => false
|
|
t.boolean :visible, :null => false
|
|
end
|
|
add_foreign_key :changeset_comments, [:changeset_id], :changesets, [:id]
|
|
add_foreign_key :changeset_comments, [:author_id], :users, [:id]
|
|
add_index :changeset_comments, :created_at
|
|
end
|
|
end
|