Sha256: 59fc431505ca29413bfc2fdfb1a1319255d3cb36a5ec5111fcaef5d1c63ca0f5

Contents?: true

Size: 508 Bytes

Versions: 7

Compression:

Stored size: 508 Bytes

Contents

class CreateAdminComments < ActiveRecord::Migration
  def change
    create_table :admin_comments do |t|
      t.integer :user_id
      t.integer :author_id, :null => false
      t.string :author_name
      t.integer :resource_id, :null => false
      t.string :resource_type, :limit => 30, :null => false
      t.text :body

      t.timestamps
    end

    add_index :admin_comments, :user_id
    add_index :admin_comments, :author_id
    add_index :admin_comments, [:resource_type, :resource_id]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ab_admin-0.2.3 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.2.2 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.2.1 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.2.0 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.1.2 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.1.1 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.1.0 db/migrate/20130101000008_create_admin_comments.rb