3 class CreateChangesetComments < ActiveRecord::Migration[4.2]
5 create_table :changeset_comments do |t|
6 t.column :changeset_id, :bigint, :null => false
7 t.column :author_id, :bigint, :null => false
8 t.text :body, :null => false
9 t.timestamp :created_at, :null => false
10 t.boolean :visible, :null => false
13 add_foreign_key :changeset_comments, :changesets, :name => "changeset_comments_changeset_id_fkey"
14 add_foreign_key :changeset_comments, :users, :column => :author_id, :name => "changeset_comments_author_id_fkey"
16 add_index :changeset_comments, :created_at