pg guide, add index to PostgreSQL array example. [ci skip]

This commit is contained in:
Yves Senn 2014-06-09 12:58:36 +02:00
parent 97ca81385e
commit a5c12cbd3c

@ -51,11 +51,13 @@ Document.create payload: data
```ruby
# db/migrate/20140207133952_create_books.rb
create_table :book do |t|
create_table :books do |t|
t.string 'title'
t.string 'tags', array: true
t.integer 'ratings', array: true
end
add_index :books, :tags, using: 'gin'
add_index :books, :ratings, using: 'gin'
# app/models/book.rb
class Book < ActiveRecord::Base