No release in over 3 years
Low commit activity in last 3 years
Allows easy manipulation of Postgres schemas from Ruby with Sequel
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3, < 3
~> 0.16
~> 12.3
~> 2.14

Runtime

>= 4.3, < 6
 Project Readme

Sequel::Postgres::Schemata

Easily manipulate Postgres schemas in Sequel.

Installation

Add this line to your application's Gemfile:

gem 'sequel-postgres-schemata'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sequel-postgres-schemata

Usage

Sequel.extension :postgres_schemata

db = Sequel.connect adapter: 'postgres', search_path: %w(foo public)
db.create_schema :bar

db.search_path # => [:foo, :public]

db.search_path :baz do
  db.search_path # => [:baz]
end

db.search_path :baz, prepend: true do
  db.search_path # => [:baz, :foo, :public]
end

db.schemata # => [:pg_toast, :pg_temp_1, :pg_toast_temp_1, :pg_catalog, :public, :information_schema, :bar]
db.current_schemata # => [:public]
db.search_path = [:bar, :foo, :public]
db.current_schemata # => [:bar, :public]
db.rename_schema :bar, :foo
db.current_schemata # => [:foo, :public]

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request