upknit

This rails engine configures necessary settings to enable native UUID primary key in rails + postgresql environment.


Keywords
postgresql, rails, uuid
License
MIT
Install
gem install upknit -v 0.9.4

Documentation

Upknit

Adding this gem to a Rails application with PostgreSQL automatically enables UUID primary key.

Usage

Add this gem to your Rails application.

Installation

Add this line to your application's Gemfile:

gem 'upknit'

And then execute:

$ bundle

Internals

This gem does two things to enable UUID primary key.

  1. Enable PostgreSQL's extension for calculation of UUID(v4).
  2. Configure generators to use UUID as primary key for newly generated tables.

License

The gem is available as open source under the terms of the MIT License.