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