Created
April 8, 2014 15:50
-
-
Save canweriotnow/10146439 to your computer and use it in GitHub Desktop.
CreatePosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreatePosts < ActiveRecord::Migration | |
def change | |
create_table :posts do |t| | |
t.string :title | |
t.text :body | |
t.integer :tag_array, array: true. default: [] | |
t.timestamps | |
end | |
add_index :posts, :tag_array, using: 'gin' | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment