Permalink
Browse files

Create or drop hstore extension only if necessary.

  • Loading branch information...
1 parent 722b551 commit 95cb030e7793d251716966da34aec8d4afcc8ca9 @svoop svoop committed Apr 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/templates/setup_hstore91.rb
@@ -1,9 +1,9 @@
class SetupHstore < ActiveRecord::Migration
def self.up
- execute "CREATE EXTENSION hstore"
+ execute "CREATE EXTENSION IF NOT EXISTS hstore"
end
def self.down
- execute "DROP EXTENSION hstore"
+ execute "DROP EXTENSION IF EXISTS hstore"
end
end

0 comments on commit 95cb030

Please sign in to comment.