Sha256: 4cbe04d0dd481a40b56f2010319e617e14c668fa79237671053686ca9d675d2f

Contents?: true

Size: 496 Bytes

Versions: 7

Compression:

Stored size: 496 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.3.6 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.3.5 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.3.4 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.3.3 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.3.2 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.3.1 db/migrate/20130101000008_create_admin_comments.rb
ab_admin-0.3.0 db/migrate/20130101000008_create_admin_comments.rb