1 class CreateComments < ActiveRecord::Migration
3 create_table :comments, :id => false do |t|
4 t.column :id, :string, :limit => 36
5 t.column :issue_id, :string, :limit => 36
6 t.column :description, :text
7 t.column :created_at, :datetime, :default => Time.now
8 t.column :created_by, :string, :limit => 36
10 add_index(:comments, [:id], :unique => true, :name => :comments_pkey)
11 add_index(:comments, [:created_by, :created_at], :name => :comments_created)
12 add_index(:comments, [:issue_id], :name => :comments_idx)
16 remove_index :comments, :name => :comments_idx
17 remove_index :comments, :name => :comments_created
18 remove_index :comments, :name => :comments_pkey