1 class CreateIssues < ActiveRecord::Migration
3 create_table :issues, :id => false do |t|
4 t.column :id, :string, :limit => 36
5 t.column :permalink_id, :string, :limit => 36
6 t.column :title, :string
7 t.column :description, :text
8 t.column :created_at, :datetime, :default => Time.now
9 t.column :updated_at, :datetime, :default => Time.now
10 t.column :created_by, :string, :limit => 36
12 add_index(:issues, [:id], :unique => true, :name => :issues_pkey)
13 add_index(:issues, [:created_by, :created_at, :updated_at], :name => :issues_created)
14 add_index(:issues, [:permalink_id, :title], :name => :issues_idx)
18 remove_index :issues, :name => :issues_idx
19 remove_index :issues, :name => :issues_created
20 remove_index :issues, :name => :issues_pkey