Last active
August 29, 2015 14:01
-
-
Save h0lyalg0rithm/1f08a4f1a7f9a32b70f4 to your computer and use it in GitHub Desktop.
Postgres HStore
This file contains 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
# /db/migrate/20140119134739_add_hstore.rb | |
class AddHstore < ActiveRecord::Migration | |
def up | |
enable_extension 'hstore' | |
end | |
def down | |
disable_extension 'hstore' | |
end | |
end | |
# /db/migrate/2014119134740_add_attr_to_image.rb | |
class AddAttrToImage < ActiveRecord::Migration | |
def change | |
add_column :images, :attr, :hstore | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment