Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CreatePosts
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
You can’t perform that action at this time.