Sha256: c76e9f62428631fb72835572ec5f30b9573ca2598e0fab8ff7926c33a0efd999

Contents?: true

Size: 614 Bytes

Versions: 2

Compression:

Stored size: 614 Bytes

Contents

class EnablePostgresExtensions < ActiveRecord::Migration
  def self.up
    enable_extension 'plpgsql' if !extension_enabled? 'plpgsql'
    enable_extension 'hstore' if !extension_enabled? 'hstore'
    enable_extension 'ltree'  if !extension_enabled? 'ltree'
    enable_extension 'uuid-ossp'  if !extension_enabled? 'uuid-ossp'
  end

  def self.down
    disable_extension 'plpgsql' if extension_enabled? 'plpgsql'
    disable_extension 'hstore' if extension_enabled? 'hstore'
    disable_extension 'ltree' if extension_enabled? 'ltree'
    disable_extension 'uuid-ossp' if extension_enabled? 'uuid-ossp'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pineapples-0.3.345 lib/pineapples/templates/db/migrate/01_enable_postgres_extensions.rb
pineapples-0.3.34 lib/pineapples/templates/db/migrate/01_enable_postgres_extensions.rb