openstreetmap-website/db/migrate/20140507110937_create_changeset_comments.rb
Łukasz Gurdek 14ac1babc2 Changeset discussions
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.
2014-10-23 21:24:51 +01:00

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