From a5c12cbd3c0e9b392edb9e4eb13dcdd256327acd Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 9 Jun 2014 12:58:36 +0200 Subject: [PATCH] pg guide, add index to PostgreSQL array example. [ci skip] --- guides/source/active_record_postgresql.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guides/source/active_record_postgresql.md b/guides/source/active_record_postgresql.md index dfa488773e..fa135b537c 100644 --- a/guides/source/active_record_postgresql.md +++ b/guides/source/active_record_postgresql.md @@ -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 -- GitLab