提交 a5c12cbd 编写于 作者: Y Yves Senn

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

上级 97ca8138
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册